summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2023-07-28 17:02:55 +0800
committerKhem Raj <raj.khem@gmail.com>2023-07-28 07:28:03 -0700
commitdd18c5fea77c6121336afb5c54e5b61ffc470d5f (patch)
tree9169cfd4ae75d6e3a75df50d72605b3d1d266408 /meta-networking
parent0eedaa546125f22e48b648bd48512a5fd29f8eae (diff)
downloadmeta-openembedded-dd18c5fea77c6121336afb5c54e5b61ffc470d5f.tar.gz
daq: enable nfq module build
NFQ is the new and improved way to process iptables packets. Snort IPS mode requires this module in some cases. Before the patch: $ snort --daq-list Available DAQ modules: pcap(v3): readback live multi unpriv ipfw(v3): live inline multi unpriv dump(v3): readback live inline multi unpriv afpacket(v5): live inline multi unpriv After the patch: $ snort --daq-list Available DAQ modules: pcap(v3): readback live multi unpriv nfq(v7): live inline multi ipfw(v3): live inline multi unpriv dump(v3): readback live inline multi unpriv afpacket(v5): live inline multi unpriv Also update 0001-correct-the-location-of-unistd.h.patch to fix build with musl. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-connectivity/daq/daq_2.0.7.bb4
-rw-r--r--meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch27
2 files changed, 24 insertions, 7 deletions
diff --git a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
index 14d809f518..c5499ffeeb 100644
--- a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
+++ b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f9ce51a65dd738dc1ae631d8b21c40e0"
6 6
7PARALLEL_MAKE = "" 7PARALLEL_MAKE = ""
8 8
9DEPENDS = "libpcap libpcre libdnet bison-native" 9DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
10 10
11SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \ 11SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
12 file://disable-run-test-program-while-cross-compiling.patch \ 12 file://disable-run-test-program-while-cross-compiling.patch \
@@ -19,7 +19,7 @@ SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13
19# 19#
20# never look to /usr/local lib while cross compiling 20# never look to /usr/local lib while cross compiling
21 21
22EXTRA_OECONF = "--disable-nfq-module --disable-ipq-module --includedir=${includedir} \ 22EXTRA_OECONF = "--enable-nfq-module --disable-ipq-module --includedir=${includedir} \
23 --with-libpcap-includes=${STAGING_INCDIR} --with-dnet-includes=${STAGING_LIBDIR}" 23 --with-libpcap-includes=${STAGING_INCDIR} --with-dnet-includes=${STAGING_LIBDIR}"
24 24
25PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" 25PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
diff --git a/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch b/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
index 38dae2099a..7587d44336 100644
--- a/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
+++ b/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch
@@ -1,14 +1,15 @@
1From 10e7d4e4bfcb70344d18f0d4ce36068475747f25 Mon Sep 17 00:00:00 2001 1From b7d54de51553f6d09906c355bd0dd326890c8fe4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 29 Mar 2017 15:59:43 -0700 3Date: Wed, 29 Mar 2017 15:59:43 -0700
4Subject: [PATCH] correct the location of unistd.h 4Subject: [PATCH] correct the location of unistd.h
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending 6Upstream-Status: Pending
9 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 os-daq-modules/daq_ipfw.c | 2 +- 10 os-daq-modules/daq_ipfw.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 os-daq-modules/daq_nfq.c | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
12 13
13diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c 14diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c
14index 016beb0..c2a4175 100644 15index 016beb0..c2a4175 100644
@@ -26,6 +27,22 @@ index 016beb0..c2a4175 100644
26 27
27 #include <netinet/in.h> 28 #include <netinet/in.h>
28 #include <sys/socket.h> 29 #include <sys/socket.h>
30diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
31index 33021c0..4de94b6 100644
32--- a/os-daq-modules/daq_nfq.c
33+++ b/os-daq-modules/daq_nfq.c
34@@ -24,10 +24,10 @@
35 #include <stdio.h>
36 #include <stdlib.h>
37 #include <string.h>
38+#include <unistd.h>
39
40 #include <sys/types.h>
41 #include <sys/time.h>
42-#include <sys/unistd.h>
43
44 #include <netinet/ip.h>
45
29-- 46--
302.12.1 472.25.1
31 48