diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2023-07-28 17:02:55 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-07-28 07:28:03 -0700 |
commit | dd18c5fea77c6121336afb5c54e5b61ffc470d5f (patch) | |
tree | 9169cfd4ae75d6e3a75df50d72605b3d1d266408 /meta-networking | |
parent | 0eedaa546125f22e48b648bd48512a5fd29f8eae (diff) | |
download | meta-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.bb | 4 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch | 27 |
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 | ||
7 | PARALLEL_MAKE = "" | 7 | PARALLEL_MAKE = "" |
8 | 8 | ||
9 | DEPENDS = "libpcap libpcre libdnet bison-native" | 9 | DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue" |
10 | 10 | ||
11 | SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \ | 11 | SRC_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 | ||
22 | EXTRA_OECONF = "--disable-nfq-module --disable-ipq-module --includedir=${includedir} \ | 22 | EXTRA_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 | ||
25 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 25 | PACKAGECONFIG ??= "${@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 @@ | |||
1 | From 10e7d4e4bfcb70344d18f0d4ce36068475747f25 Mon Sep 17 00:00:00 2001 | 1 | From b7d54de51553f6d09906c355bd0dd326890c8fe4 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 29 Mar 2017 15:59:43 -0700 | 3 | Date: Wed, 29 Mar 2017 15:59:43 -0700 |
4 | Subject: [PATCH] correct the location of unistd.h | 4 | Subject: [PATCH] correct the location of unistd.h |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
9 | 7 | ||
8 | Signed-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 | ||
13 | diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c | 14 | diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c |
14 | index 016beb0..c2a4175 100644 | 15 | index 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> |
30 | diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c | ||
31 | index 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 | -- |
30 | 2.12.1 | 47 | 2.25.1 |
31 | 48 | ||