summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-filter/nftables/nftables/0001-fix-typo-in-test-script.patch35
-rw-r--r--meta-networking/recipes-filter/nftables/nftables_1.1.5.bb7
2 files changed, 41 insertions, 1 deletions
diff --git a/meta-networking/recipes-filter/nftables/nftables/0001-fix-typo-in-test-script.patch b/meta-networking/recipes-filter/nftables/nftables/0001-fix-typo-in-test-script.patch
new file mode 100644
index 0000000000..c0d1e33b5e
--- /dev/null
+++ b/meta-networking/recipes-filter/nftables/nftables/0001-fix-typo-in-test-script.patch
@@ -0,0 +1,35 @@
1From 956e7d89865b497f889483c90bc7fed9bec4e030 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Sun, 26 Oct 2025 18:55:06 +0100
4Subject: [PATCH 1/2] fix typo in test script
5
6While executing the test suite from tests/shell/testcases folder, a lot of errors
7are displayed:
8
9tests/shell/testcases/maps/vmap_timeout: line 48: [: : integer expected
10
11Looking at the script, a non-existing variable (expires) is tested instead of
12the existing one (expire).
13
14This change corrects this.
15
16Upstream-Status: Submitted [https://lore.kernel.org/netfilter-devel/20251026204107.2438565-1-skandigraun@gmail.com/T/#u]
17
18Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
19---
20 tests/shell/testcases/maps/vmap_timeout | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/tests/shell/testcases/maps/vmap_timeout b/tests/shell/testcases/maps/vmap_timeout
24index 8ac7e8e7..55d1c1b9 100755
25--- a/tests/shell/testcases/maps/vmap_timeout
26+++ b/tests/shell/testcases/maps/vmap_timeout
27@@ -45,7 +45,7 @@ for i in $(seq 1 100) ; do
28 expire=$((RANDOM%utimeout))
29
30 expire_str=""
31- if [ "$expires" -gt 0 ]; then
32+ if [ "$expire" -gt 0 ]; then
33 expire_str="expires ${expire}s"
34 fi
35
diff --git a/meta-networking/recipes-filter/nftables/nftables_1.1.5.bb b/meta-networking/recipes-filter/nftables/nftables_1.1.5.bb
index a1954c0814..a2c6ce0e23 100644
--- a/meta-networking/recipes-filter/nftables/nftables_1.1.5.bb
+++ b/meta-networking/recipes-filter/nftables/nftables_1.1.5.bb
@@ -12,6 +12,7 @@ DEPENDS = "libmnl libnftnl bison-native \
12 ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" 12 ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
13 13
14SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ 14SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \
15 file://0001-fix-typo-in-test-script.patch \
15 file://run-ptest \ 16 file://run-ptest \
16 " 17 "
17SRC_URI[sha256sum] = "1daf10f322e14fd90a017538aaf2c034d7cc1eb1cc418ded47445d714ea168d4" 18SRC_URI[sha256sum] = "1daf10f322e14fd90a017538aaf2c034d7cc1eb1cc418ded47445d714ea168d4"
@@ -67,6 +68,9 @@ do_install() {
67 68
68RDEPENDS:${PN}-ptest += " ${PN}-python bash coreutils make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux" 69RDEPENDS:${PN}-ptest += " ${PN}-python bash coreutils make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux"
69 70
71
72# For ptests compile the kernel with CONFIG_NFT_TPROXY
73
70RRECOMMENDS:${PN}-ptest += "\ 74RRECOMMENDS:${PN}-ptest += "\
71kernel-module-nft-chain-nat kernel-module-nft-queue \ 75kernel-module-nft-chain-nat kernel-module-nft-queue \
72kernel-module-nft-compat kernel-module-nft-quota \ 76kernel-module-nft-compat kernel-module-nft-quota \
@@ -79,7 +83,7 @@ kernel-module-nft-log kernel-module-nft-socket \
79kernel-module-nft-masq kernel-module-nft-synproxy \ 83kernel-module-nft-masq kernel-module-nft-synproxy \
80kernel-module-nft-nat kernel-module-nft-tunnel \ 84kernel-module-nft-nat kernel-module-nft-tunnel \
81kernel-module-nft-numgen kernel-module-nft-xfrm \ 85kernel-module-nft-numgen kernel-module-nft-xfrm \
82kernel-module-nft-osf \ 86kernel-module-nft-osf kernel-module-nft-tproxy \
83kernel-module-nf-flow-table \ 87kernel-module-nf-flow-table \
84kernel-module-nf-flow-table-inet \ 88kernel-module-nf-flow-table-inet \
85kernel-module-nf-nat \ 89kernel-module-nf-nat \
@@ -102,6 +106,7 @@ do_install_ptest() {
102 cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} 106 cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR}
103 sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py 107 sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py
104 sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py 108 sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py
109 sed -i 's#exec python -c#exec python3 -c#' ${D}${PTEST_PATH}/${TESTDIR}/shell/helpers/json-pretty.sh
105 # handle multilib 110 # handle multilib
106 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest 111 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
107} 112}