]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: skip if kernel does not support flowtable with no devices
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Nov 2023 16:07:42 +0000 (17:07 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Nov 2023 12:27:20 +0000 (13:27 +0100)
Originally, flowtables required devices in place to work, this was later
relaxed to allow flowtable with no initial devices, see 05abe4456fa3
("netfilter: nf_tables: allow to register flowtable with no devices").

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/features/flowtable_no_devices.nft [new file with mode: 0755]
tests/shell/testcases/listing/0020flowtable_0

diff --git a/tests/shell/features/flowtable_no_devices.nft b/tests/shell/features/flowtable_no_devices.nft
new file mode 100755 (executable)
index 0000000..30dd3db
--- /dev/null
@@ -0,0 +1,8 @@
+# 05abe4456fa3 ("netfilter: nf_tables: allow to register flowtable with no devices")
+# v5.8-rc1~165^2~27^2~1
+table ip filter2 {
+       flowtable main_ft2 {
+               hook ingress priority filter
+               counter
+       }
+}
index 6eb82cfeabc35c2ebad1ef61275e70a7ca46b22a..0e89f5dd01393dfb52cb9a6752b56ca69fd7d1f4 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_flowtable_no_devices)
+
 # list only the flowtable asked for with table
 
 set -e