Accepting request 637759 from Base:System

OBS-URL: https://build.opensuse.org/request/show/637759
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libpcap?expand=0&rev=56
This commit is contained in:
Dominique Leuenberger 2018-10-02 17:43:17 +00:00 committed by Git OBS Bridge
commit 00d4fd7f3d
8 changed files with 80 additions and 35 deletions

View File

@ -0,0 +1,45 @@
From: Michal Kubecek <mkubecek@suse.cz>
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 <id>" 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 */

View File

@ -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 <remote-ext.h>
+#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 <remote-ext.h>
-#endif /* HAVE_REMOTE */
-
#ifdef __cplusplus
}
#endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e
size 739163

Binary file not shown.

3
libpcap-1.9.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019
size 832079

BIN
libpcap-1.9.0.tar.gz.sig Normal file

Binary file not shown.

View File

@ -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 <id>" 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

View File

@ -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