From 6b1b397e74765959cade29fe184c51fa5c4b85b028010c1ea20f4325e4655d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 24 Sep 2018 19:10:18 +0000 Subject: [PATCH] Accepting request 637756 from home:mkubecek:branches:Base:System - update to 1.9.0 OBS-URL: https://build.opensuse.org/request/show/637756 OBS-URL: https://build.opensuse.org/package/show/Base:System/libpcap?expand=0&rev=63 --- Check-only-VID-in-VLAN-test-issue-461.patch | 45 ++++++++++++++++++++ disable-remote.diff | 29 ------------- libpcap-1.8.1.tar.gz | 3 -- libpcap-1.8.1.tar.gz.sig | Bin 419 -> 0 bytes libpcap-1.9.0.tar.gz | 3 ++ libpcap-1.9.0.tar.gz.sig | Bin 0 -> 419 bytes libpcap.changes | 27 ++++++++++++ libpcap.spec | 8 ++-- 8 files changed, 80 insertions(+), 35 deletions(-) create mode 100644 Check-only-VID-in-VLAN-test-issue-461.patch delete mode 100644 disable-remote.diff delete mode 100644 libpcap-1.8.1.tar.gz delete mode 100644 libpcap-1.8.1.tar.gz.sig create mode 100644 libpcap-1.9.0.tar.gz create mode 100644 libpcap-1.9.0.tar.gz.sig diff --git a/Check-only-VID-in-VLAN-test-issue-461.patch b/Check-only-VID-in-VLAN-test-issue-461.patch new file mode 100644 index 0000000..966fc5d --- /dev/null +++ b/Check-only-VID-in-VLAN-test-issue-461.patch @@ -0,0 +1,45 @@ +From: Michal Kubecek +Date: Mon, 24 Sep 2018 18:19:04 +0200 +Subject: Check only VID in VLAN test (issue #461) +Patch-mailine: libpcap-1.9.1? +Git-commit: b525a0863466ba863630c0450926044230b447e8 +References: https://github.com/the-tcpdump-group/libpcap/issues/461 + +The SKF_AD_VLAN_TAG value in metadata contains the whole TCI so that if we +want to use it for "vlan " test, we need to apply 0xfff mask to compare +only VID. + +Rather than adding another 'and' instruction, use existing one we already +have for the "not offloaded" case so that when patching block like e.g. + + (010) ldh [14] + (011) and #0xfff + (012) jeq #0xb jt 13 jf 14 + +we jump to (011) instead of (012). + +Fixes: 04660eb1e561 ("Use BPF extensions in compiled filters") +--- + gencode.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/gencode.c ++++ b/gencode.c +@@ -8234,12 +8234,15 @@ gen_vlan_patch_vid_test(compiler_state_t *cstate, struct block *b_vid) + sappend(s, s2); + sjeq->s.jt = s2; + +- /* jump to the test in b_vid (bypass loading VID from packet data) */ ++ /* Jump to the test in b_vid. We need to jump one instruction before ++ * the end of the b_vid block so that we only skip loading the TCI ++ * from packet data and not the 'and' instruction extractging VID. ++ */ + cnt = 0; + for (s2 = b_vid->stmts; s2; s2 = s2->next) + cnt++; + s2 = new_stmt(cstate, JMP(BPF_JA)); +- s2->s.k = cnt; ++ s2->s.k = cnt - 1; + sappend(s, s2); + + /* insert our statements at the beginning of b_vid */ diff --git a/disable-remote.diff b/disable-remote.diff deleted file mode 100644 index a14c2ce..0000000 --- a/disable-remote.diff +++ /dev/null @@ -1,29 +0,0 @@ -Disable bits of remote capture support inherited from the WinPCAP merge -which cause applications to FTBFS if they define HAVE_REMOTE (#843384). - ---- a/pcap/pcap.h -+++ b/pcap/pcap.h -@@ -506,6 +506,11 @@ - #define MODE_STAT 1 - #define MODE_MON 2 - -+#ifdef HAVE_REMOTE -+ /* Includes most of the public stuff that is needed for the remote capture */ -+ #include -+#endif /* HAVE_REMOTE */ -+ - #elif defined(MSDOS) - - /* -@@ -526,11 +531,6 @@ - - #endif /* _WIN32/MSDOS/UN*X */ - --#ifdef HAVE_REMOTE -- /* Includes most of the public stuff that is needed for the remote capture */ -- #include --#endif /* HAVE_REMOTE */ -- - #ifdef __cplusplus - } - #endif diff --git a/libpcap-1.8.1.tar.gz b/libpcap-1.8.1.tar.gz deleted file mode 100644 index 06c3e38..0000000 --- a/libpcap-1.8.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e -size 739163 diff --git a/libpcap-1.8.1.tar.gz.sig b/libpcap-1.8.1.tar.gz.sig deleted file mode 100644 index fa7bda83d7e090a0d1db551c0ce6a7e44ccfc45ea95b480e82c2e29bb26b2a0b..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 419 zcmV;U0bKrx0iXl`0RjL91p-(P{!IW12@v3k-tpPNT@CZh3?4m@WvgG_#icQaT#Ssc zO=##{OsJTD(lSskt?|*I_Ph4`y-g77bBGEFc3CqBr-->LO8rpv{R$bPxPK^G==?2sLA1917|05L6rN*q!vqm(f)R)AT z3ze%(Z{_&~+(s7r?l$t+v;v+Dv428Go*qFgZ#UxfV})cxTUNjuOlimcUBuG)X->XT zZl;=db3gUnc8rv_!7~K-{^D{PtiVj6pCp0lyiP+q^%Qi0YdfngVSB@&!I&^E2#S^sY`!U2M#TLUX)7GL+=(4;R$XfpMpS&H4^z3Q!lkEG>)t^v7gA0=HY%*xUM N)gPe|>1s04>WkHL(4YVS diff --git a/libpcap-1.9.0.tar.gz b/libpcap-1.9.0.tar.gz new file mode 100644 index 0000000..12601c7 --- /dev/null +++ b/libpcap-1.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019 +size 832079 diff --git a/libpcap-1.9.0.tar.gz.sig b/libpcap-1.9.0.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..18f877cf6d2ea0b287ff12796c9f74190f662069784d6f4d792af1af89bff2f5 GIT binary patch literal 419 zcmV;U0bKrx0iXl`0RjL91p-@CyjK7U2@v3k-tpPNT@Ad|3?F)VjI2cvZbqxsT^-Z< z_zA<(H5f~P>{Mi<@z&yzb-at&EF)2n@B~iVrppbI`_zYS!Q4iWu%L~vYeIKWv9sB( z6l_K)hBg9=T0N>QMsY%=W%r`fuK;ka$W0*DNU^V@I}!eR@X0@n64#79d1eBpB%wX1 z8i?B=Zr%~=U|Hbpc7s`3!@P4TWZ^_it>8~gfEC*TPw)O2DI28D_-QuoAbju}000~q zo7@I!SI*L6PuEP}qx^q2=D_6o0&6rSWa-kMXz?j$khdWCtTM(*!vC6#=Yc;4!pfan z`le29uJ;cdJ{wS->1;!_i=*u!NLOSd71?|$03_s``AR;72iuviHxX*rVBh3EV`&hf zsj_roIsS2q^HLn|K&LDckvOc8}^@`W93xc9f5{P|05#uT-i%0k(zClJOF%N>+P Nwoi62h1a)eaV46r%|8GD literal 0 HcmV?d00001 diff --git a/libpcap.changes b/libpcap.changes index 16356c3..e71cd31 100644 --- a/libpcap.changes +++ b/libpcap.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Mon Sep 24 17:46:26 UTC 2018 - mkubecek@suse.cz + +- update to 1.9.0 + * add testing system to libpcap, independent of tcpdump + * changes to how pcap_t is activated + * update included copies of BSD 4-clause license to 3-clause + * additions to TCP header parsing, per RFC3168 + * support setting non-blocking mode before activating + * fixes so that non-AF_INET addresses, are not ==AF_INET6 addresses + * pcap_compile() in 1.8.0 and later is newly thread-safe + * bound snaplen for linux tpacket_v2 to ~64k + * make VLAN filter handle both metadata and inline tags + (bsc#874131 bsc#993691 fate#321405) + * D-Bus captures can now be up to 128MB in size + * add DLT_LORATAP and DLT_VSOCK + * allow specifying a specific capture protocol + * RDMA sniffing support for pcap + * increase minimum autoconf version requirement to 2.64 + * rpcapd: support for xinetd.conf and systemd units + * provide pkgconfig file +- add BuildRequires for autoconf >= 2.64 +- package (newly added) pkgconfig file +- Check-only-VID-in-VLAN-test-issue-461.patch: + fix "vlan " test to check only VID, not complete TCI +- drop disable-remote.diff (superseded by upstream changes) + ------------------------------------------------------------------- Thu Mar 1 14:49:43 UTC 2018 - jengelh@inai.de diff --git a/libpcap.spec b/libpcap.spec index ffd9888..6e1ffce 100644 --- a/libpcap.spec +++ b/libpcap.spec @@ -17,7 +17,7 @@ Name: libpcap -Version: 1.8.1 +Version: 1.9.0 Release: 0 Summary: A Library for Network Sniffers License: BSD-3-Clause @@ -31,7 +31,8 @@ Source4: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig Patch2: libpcap-1.0.0-ppp.patch Patch3: libpcap-1.0.0-s390.patch Patch5: libpcap-no-old-socket.patch -Patch6: disable-remote.diff +Patch6: Check-only-VID-in-VLAN-test-issue-461.patch +BuildRequires: autoconf >= 2.64 BuildRequires: automake BuildRequires: bison BuildRequires: bluez-devel @@ -113,7 +114,7 @@ make DESTDIR=%{buildroot} install install-shared %files -n libpcap1 %defattr(-, root, root) -%doc CHANGES CREDITS LICENSE README README.linux TODO +%doc CHANGES CREDITS LICENSE README.md doc/README.linux.md TODO %{_libdir}/*.so.* %{_mandir}/man7/* @@ -127,5 +128,6 @@ make DESTDIR=%{buildroot} install install-shared %{_includedir}/* %{_bindir}/pcap-config %{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc %changelog