summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-07-21 02:14:07 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-07-23 21:16:53 +0200
commit83adca5e57a6e6a2cc993eaf0be94b7510f0f036 (patch)
tree57f9e6a969c516f1c8a26443f6dd9454b0dd01b0 /tests
parent3ab02db5f836ae0cf9fe7fba616d7eb52139d537 (diff)
tests: shell: check for table re-definition usecase
Make sure nft behaves like 0.9.0 -- the ruleset flush ruleset table inet filter { } table inet filter { chain test { counter } } loads again without crashing/generating an error message. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1351 Fixes: e5382c0d08e3c ("src: Support intra-transaction rule references") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/cache/0004_cache_update_015
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/shell/testcases/cache/0004_cache_update_0 b/tests/shell/testcases/cache/0004_cache_update_0
new file mode 100755
index 00000000..697d9de0
--- /dev/null
+++ b/tests/shell/testcases/cache/0004_cache_update_0
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Trigger a crash or rule restore error with nft 0.9.1
+$NFT -f - >/dev/null <<EOF
+flush ruleset
+table inet testfilter {
+}
+table inet testfilter {
+ chain test {
+ counter
+ }
+}
+EOF