]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
packages: nftables: fix build on host with busybox ash
authorShine <4c.fce2@proton.me>
Mon, 2 Feb 2026 22:06:44 +0000 (23:06 +0100)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 21 Jun 2026 09:18:45 +0000 (11:18 +0200)
Numeric for loops are a bashism and won't work in BusyBox' ash. Replace
with a portable equivalent.

Backport of a post-1.1.6 nftables fix.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21957
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
package/network/utils/nftables/patches/001-for-bash-syntax.patch [new file with mode: 0644]

diff --git a/package/network/utils/nftables/patches/001-for-bash-syntax.patch b/package/network/utils/nftables/patches/001-for-bash-syntax.patch
new file mode 100644 (file)
index 0000000..8db917b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -17940,7 +17940,7 @@
+       echo "  ${STABLE_RELEASE}"
+       echo "};"
+       echo "static char nftbuildstamp[] = {"
+-      for ((i = 56; i >= 0; i-= 8)); do
++      for i in `seq 56 -8 0`; do
+               echo "  ((uint64_t)MAKE_STAMP >> $i) & 0xff,"
+       done
+       echo "};"