[libpcap/f20] NFLOG: don't crash trying to filter at link layer
Michal Sekletar
msekleta at fedoraproject.org
Thu Nov 27 14:55:22 UTC 2014
commit 47e6da500f7211434ed035b6026bc1a7f711f199
Author: Michal Sekletar <msekleta at redhat.com>
Date: Thu Nov 27 15:34:17 2014 +0100
NFLOG: don't crash trying to filter at link layer
(cherry picked from commit 676cf8a61ed240d0a86d471ef419f45ba35dba80)
Resolves:#1147600
...on-t-crash-trying-to-filter-at-link-layer.patch | 41 ++++++++++++++++++++
libpcap.spec | 6 ++-
2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/0005-NFLOG-don-t-crash-trying-to-filter-at-link-layer.patch b/0005-NFLOG-don-t-crash-trying-to-filter-at-link-layer.patch
new file mode 100644
index 0000000..af43b50
--- /dev/null
+++ b/0005-NFLOG-don-t-crash-trying-to-filter-at-link-layer.patch
@@ -0,0 +1,41 @@
+From 676cf8a61ed240d0a86d471ef419f45ba35dba80 Mon Sep 17 00:00:00 2001
+From: Denis Ovsienko <infrastation at yandex.ru>
+Date: Thu, 5 Dec 2013 14:54:14 +0400
+Subject: [PATCH] NFLOG: don't crash trying to filter at link layer
+
+Before:
+
+@ tcpdump -i nflog icmp
+tcpdump: WARNING: SIOCGIFADDR: nflog: No such device
+Aborted (core dumped)
+
+After:
+
+@ tcpdump -i nflog icmp
+tcpdump: WARNING: SIOCGIFADDR: nflog: No such device
+tcpdump: NFLOG link-layer type filtering not implemented
+---
+ gencode.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/gencode.c b/gencode.c
+index 7bb07fb..d58ea30 100644
+--- a/gencode.c
++++ b/gencode.c
+@@ -3410,6 +3410,13 @@ gen_linktype(proto)
+
+ case DLT_AX25_KISS:
+ bpf_error("AX.25 link-layer type filtering not implemented");
++
++ case DLT_NFLOG:
++ /* Using the fixed-size NFLOG header it is possible to tell only
++ * the address family of the packet, other meaningful data is
++ * either missing or behind TLVs.
++ */
++ bpf_error("NFLOG link-layer type filtering not implemented");
+ }
+
+ /*
+--
+1.8.3.1
+
diff --git a/libpcap.spec b/libpcap.spec
index a6e4954..39dc391 100644
--- a/libpcap.spec
+++ b/libpcap.spec
@@ -1,7 +1,7 @@
Name: libpcap
Epoch: 14
Version: 1.5.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A system-independent interface for user-level packet capture
Group: Development/Libraries
License: BSD with advertising
@@ -14,6 +14,7 @@ Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch
Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch
Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch
Patch0004: 0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch
+Patch0005: 0005-NFLOG-don-t-crash-trying-to-filter-at-link-layer.patch
%description
Libpcap provides a portable framework for low-level network
@@ -83,6 +84,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%{_mandir}/man5/pcap*.5*
%changelog
+* Thu Nov 27 2014 Michal Sekletar <msekleta at redhat.com> - 14:1.5.3-3
+- don't crash when trying to filter on interface with NFLOG link layer type (#1147600)
+
* Mon Sep 29 2014 Michal Sekletar <msekleta at redhat.com> - 14:1.5.3-2
- disable TPACKET_V3 support (#1131500)
More information about the scm-commits
mailing list