diff --git a/libpcap-1.5.3.tar.gz b/libpcap-1.5.3.tar.gz deleted file mode 100644 index bbbe60b..0000000 --- a/libpcap-1.5.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ae92159c1060f15e6a90f2c4ad227268b6aaa382c316fa49a31c496b9979e93 -size 642352 diff --git a/libpcap-1.5.3.tar.gz.sig b/libpcap-1.5.3.tar.gz.sig deleted file mode 100644 index 533f263..0000000 Binary files a/libpcap-1.5.3.tar.gz.sig and /dev/null differ diff --git a/libpcap-1.6.1.tar.gz b/libpcap-1.6.1.tar.gz new file mode 100644 index 0000000..ef89e35 --- /dev/null +++ b/libpcap-1.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:116cbb3ac9e96d5dd7b39638a2f894a67fa3dcf06d794e6dae2b9a942ad13476 +size 651061 diff --git a/libpcap-1.6.1.tar.gz.sig b/libpcap-1.6.1.tar.gz.sig new file mode 100644 index 0000000..82e6c7b Binary files /dev/null and b/libpcap-1.6.1.tar.gz.sig differ diff --git a/libpcap-netlink.patch b/libpcap-netlink.patch deleted file mode 100644 index cde642d..0000000 --- a/libpcap-netlink.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/pcap-common.c b/pcap-common.c -index 6175a5a..f26d22e 100644 ---- a/pcap-common.c -+++ b/pcap-common.c -@@ -932,7 +932,12 @@ - */ - #define LINKTYPE_WIRESHARK_UPPER_PDU 252 - --#define LINKTYPE_MATCHING_MAX 252 /* highest value in the "matching" range */ -+/* -+ * Link-layer header type for the netlink protocol (nlmon devices). -+ */ -+#define LINKTYPE_NETLINK 253 -+ -+#define LINKTYPE_MATCHING_MAX 253 /* highest value in the "matching" range */ - - static struct linktype_map { - int dlt; -diff --git a/pcap-linux.c b/pcap-linux.c -index c6fd076..1d2c130 100644 ---- a/pcap-linux.c -+++ b/pcap-linux.c -@@ -2604,6 +2604,8 @@ map_packet_type_to_sll_type(short int sll_pkttype) - */ - static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) - { -+ struct pcap_linux *handlep = handle->priv; -+ - switch (arptype) { - - case ARPHRD_ETHER: -@@ -2976,6 +2976,19 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) - handle->linktype = DLT_IEEE802_15_4_NOFCS; - break; - -+#ifndef ARPHRD_NETLINK -+#define ARPHRD_NETLINK 824 -+#endif -+ case ARPHRD_NETLINK: -+ handle->linktype = DLT_NETLINK; -+ /* -+ * We need to use cooked mode, so that in sll_protocol we -+ * pick up the netlink protocol type such as NETLINK_ROUTE, -+ * NETLINK_GENERIC, NETLINK_FIB_LOOKUP, etc. -+ */ -+ handlep->cooked = 1; -+ break; -+ - default: - handle->linktype = -1; - break; -@@ -3181,7 +3194,8 @@ activate_new(pcap_t *handle) - * same applies to LAPD capture. - */ - if (handle->linktype != DLT_LINUX_IRDA && -- handle->linktype != DLT_LINUX_LAPD) -+ handle->linktype != DLT_LINUX_LAPD && -+ handle->linktype != DLT_NETLINK) - handle->linktype = DLT_LINUX_SLL; - } - -diff --git a/pcap.c b/pcap.c -index 6b16cea..83d4bb1 100644 ---- a/pcap.c -+++ b/pcap.c -@@ -1203,6 +1203,7 @@ static struct dlt_choice dlt_choices[] = { - DLT_CHOICE(DLT_NETANALYZER_TRANSPARENT, "Ethernet with Hilscher netANALYZER pseudo-header and with preamble and SFD"), - DLT_CHOICE(DLT_IPOIB, "RFC 4391 IP-over-Infiniband"), - DLT_CHOICE(DLT_DBUS, "D-Bus"), -+ DLT_CHOICE(DLT_NETLINK, "Linux netlink"), - DLT_CHOICE_SENTINEL - }; - -diff --git a/pcap/bpf.h b/pcap/bpf.h -index 608ef39..d30bf95 100644 ---- a/pcap/bpf.h -+++ b/pcap/bpf.h -@@ -1243,7 +1243,12 @@ struct bpf_program { - */ - #define DLT_WIRESHARK_UPPER_PDU 252 - --#define DLT_MATCHING_MAX 252 /* highest value in the "matching" range */ -+/* -+ * DLT type for the netlink protocol (nlmon devices). -+ */ -+#define DLT_NETLINK 253 -+ -+#define DLT_MATCHING_MAX 253 /* highest value in the "matching" range */ - - /* - * DLT and savefile link type values are split into a class and diff --git a/libpcap.changes b/libpcap.changes index 542d2f4..c3818ca 100644 --- a/libpcap.changes +++ b/libpcap.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Sun Aug 17 19:50:37 UTC 2014 - andreas.stieger@gmx.de + +- libpcap 1.6.1: + * some fixes for the any device + * changes for how --enable-XXX works +- includes changes from 1.6.0: + * fixes for byte order issues with NFLOG captures + * Handle using cooked mode for DLT_NETLINK in activate_new(). + removing libpcap-netlink.patch, upstream, [bnc#863823] + * on platforms where you can not capture on down interfaces, do + not list them, but: do list interfaces which are down, if you + can capture on them! +- libpcap does not build with bluez 5.21, disable bluetooth + ( bluetooth/mgmt.h moved to kernel ) + ------------------------------------------------------------------- Thu Feb 13 16:18:19 UTC 2014 - vcizek@suse.com diff --git a/libpcap.spec b/libpcap.spec index ae2d5e5..76c93fa 100644 --- a/libpcap.spec +++ b/libpcap.spec @@ -16,8 +16,11 @@ # +# bluetooth not working with bluez 5.21 +%bcond_with bluetooth + Name: libpcap -Version: 1.5.3 +Version: 1.6.1 Release: 0 Summary: A Library for Network Sniffers License: BSD-3-Clause @@ -32,10 +35,8 @@ Patch1: libpcap-1.0.0-pcap-bpf.patch Patch2: libpcap-1.0.0-ppp.patch Patch3: libpcap-1.0.0-s390.patch Patch4: libpcap-ocloexec.patch -Patch5: libpcap-netlink.patch BuildRequires: automake BuildRequires: bison -BuildRequires: bluez-devel BuildRequires: dbus-1-devel BuildRequires: flex BuildRequires: libusb-devel @@ -46,6 +47,9 @@ BuildRequires: libnl3-devel %if 0%{?suse_version} >= 1230 BuildRequires: gpg-offline %endif +%if %{with bluetooth} +BuildRequires: bluez-devel +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -97,7 +101,6 @@ program yourself. %patch2 %patch3 %patch4 -p1 -%patch5 -p1 %build %ifarch %sparc pic="PIC" @@ -107,7 +110,12 @@ pic="pic" autoreconf -fiv export CFLAGS="%{optflags} -f$pic" CXXFLAGS="%{optflags} -f$pic" %configure \ - --enable-ipv6 +%if %{with bluetooth} + --enable-bluetooth=yes \ +%else + --enable-bluetooth=no \ +%endif + --enable-ipv6 make %{?_smp_mflags} all shared %install