summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-02-03 19:42:26 +0100
committerFlorian Westphal <fw@strlen.de>2021-02-05 12:35:40 +0100
commit87ef765a9ad4477b324c06d187d8ea5e521ed2cf (patch)
tree13c57e85e011a4d77f1b868311ed394abd7f9d02 /tests
parent50692377c1ba014720dee1db9f0e5beee6f16f27 (diff)
tests: add empty dynamic set
nft crashes on restore. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/nft-f/0025empty_dynset_016
-rw-r--r--tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft12
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/0025empty_dynset_0 b/tests/shell/testcases/nft-f/0025empty_dynset_0
new file mode 100755
index 00000000..796628a7
--- /dev/null
+++ b/tests/shell/testcases/nft-f/0025empty_dynset_0
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+RULESET="table ip foo {
+ set inflows {
+ type ipv4_addr . inet_service . ifname . ipv4_addr . inet_service
+ flags dynamic
+ elements = { 10.1.0.3 . 39466 . \"veth1\" . 10.3.0.99 . 5201 counter packets 0 bytes 0 }
+ }
+
+ set inflows6 {
+ type ipv6_addr . inet_service . ifname . ipv6_addr . inet_service
+ flags dynamic
+ }
+}"
+
+$NFT -f - <<< "$RULESET"
diff --git a/tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft b/tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft
new file mode 100644
index 00000000..559eb49f
--- /dev/null
+++ b/tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft
@@ -0,0 +1,12 @@
+table ip foo {
+ set inflows {
+ type ipv4_addr . inet_service . ifname . ipv4_addr . inet_service
+ flags dynamic
+ elements = { 10.1.0.3 . 39466 . "veth1" . 10.3.0.99 . 5201 counter packets 0 bytes 0 }
+ }
+
+ set inflows6 {
+ type ipv6_addr . inet_service . ifname . ipv6_addr . inet_service
+ flags dynamic
+ }
+}