]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: add test case for sets without key
authorFlorian Westphal <fw@strlen.de>
Tue, 5 Dec 2023 12:59:15 +0000 (13:59 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 6 Dec 2023 15:52:13 +0000 (16:52 +0100)
tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert
BUG: unhandled key type 2
nft: src/intervals.c:59: setelem_expr_to_range: Assertion `0' failed.

[ This bug doesn't trigger anymore due to
  1949a63215b4 ("evaluate: reject set definition with no key") ]

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert [new file with mode: 0644]

diff --git a/tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert b/tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert
new file mode 100644 (file)
index 0000000..59ef1ab
--- /dev/null
@@ -0,0 +1,12 @@
+table inet testifsets {
+       map map_wild {  elements = { "abcdex*",
+                            "othername",
+                            "ppp0" }
+       }
+       map map_wild {
+               type ifname : verdict
+               flags interval
+               elements = { "abcdez*" : jump do_nothing,
+                            "eth0" : jump do_nothing }
+       }
+}