summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-03-21 12:59:11 +0100
committerFlorian Westphal <fw@strlen.de>2018-03-21 14:13:00 +0100
commitaaf404533ace3c8a355b28deb12793fb11ef3c2a (patch)
tree4345a073e49b292433b03a2e814d7fdffdf1df13 /tests/shell/testcases
parent0f996897455d20958bdad23a1d467f68f1f81b18 (diff)
tests/shell: Test flush and nat chain recreate in one go
This tests what kernel commit ae6153b50f9bf ("netfilter: nf_tables: permit second nat hook if colliding hook is going away") fixed for. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-xtests/shell/testcases/transactions/0041nat_restore_017
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/shell/testcases/transactions/0041nat_restore_0 b/tests/shell/testcases/transactions/0041nat_restore_0
new file mode 100755
index 00000000..62971852
--- /dev/null
+++ b/tests/shell/testcases/transactions/0041nat_restore_0
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+RULESET="
+add table ip t
+add chain ip t c { type nat hook postrouting priority 0; }
+"
+
+$NFT -f - <<< $RULESET
+
+RULESET="
+flush ruleset
+$RULESET
+"
+
+$NFT -f - <<< $RULESET