]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: extend existing dormat test case to catch a kernel bug
authorFlorian Westphal <fw@strlen.de>
Tue, 14 Jul 2020 16:34:59 +0000 (18:34 +0200)
committerFlorian Westphal <fw@strlen.de>
Sat, 18 Jul 2020 13:28:01 +0000 (15:28 +0200)
This is a test case for the kernel bug fixed by:
  netfilter: nf_tables: fix nat hook table deletion

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/transactions/0002table_0
tests/shell/testcases/transactions/dumps/0002table_0.nft

index 246b10924d19bab6feae1944d04778c15a4a75de..c5f31a6fb40177dd663b65e9ecaf540a45453fd9 100755 (executable)
@@ -5,6 +5,7 @@ set -e
 RULESET="add table x
 delete table x
 add table x
+add chain x y { type nat hook prerouting priority 0; policy accept; }
 add table x { flags dormant; }"
 
 $NFT -f - <<< "$RULESET"
index 6eb70726385fa7f35b8365c9b0672b77822e6caa..429cbc3487812cdffd32fc8b753f102fb7cb0e3c 100644 (file)
@@ -1,3 +1,7 @@
 table ip x {
        flags dormant
+
+       chain y {
+               type nat hook prerouting priority filter; policy accept;
+       }
 }