[LEDE-DEV] [PATCH] libpcap: add optional netfilter support

Martin Schiller mschiller at tdt.de
Thu Feb 16 02:00:37 PST 2017


This is needed to use the nflog interface with tcpdump

Signed-off-by: Martin Schiller <mschiller at tdt.de>
---
 package/libs/libpcap/Config.in | 5 +++++
 package/libs/libpcap/Makefile  | 7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/package/libs/libpcap/Config.in b/package/libs/libpcap/Config.in
index 5fee75a..764d471 100644
--- a/package/libs/libpcap/Config.in
+++ b/package/libs/libpcap/Config.in
@@ -12,4 +12,9 @@ config PCAP_HAS_BT
 	depends on BROKEN
 	default n
 
+config PCAP_HAS_NETFILTER
+	bool "Include netfilter support"
+	select PACKAGE_kmod-ipt-nflog
+	default n
+
 endmenu
diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile
index d3360d2..4d0ce40 100644
--- a/package/libs/libpcap/Makefile
+++ b/package/libs/libpcap/Makefile
@@ -48,9 +48,12 @@ TARGET_CFLAGS += \
 
 CONFIGURE_VARS += \
 	ac_cv_linux_vers=$(LINUX_VERSION) \
-	ac_cv_header_libusb_1_0_libusb_h=no \
-	ac_cv_netfilter_can_compile=no
+	ac_cv_header_libusb_1_0_libusb_h=no
 
+ifeq ($(CONFIG_PCAP_HAS_NETFILTER),)
+CONFIGURE_VARS += \
+	ac_cv_netfilter_can_compile=no
+endif
 
 CONFIGURE_ARGS += \
 	--enable-shared \
-- 
2.1.4




More information about the Lede-dev mailing list