summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/cache/0005_cache_chain_flush
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/cache/0005_cache_chain_flush')
-rwxr-xr-xtests/shell/testcases/cache/0005_cache_chain_flush16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/shell/testcases/cache/0005_cache_chain_flush b/tests/shell/testcases/cache/0005_cache_chain_flush
new file mode 100755
index 00000000..7dfe5c1c
--- /dev/null
+++ b/tests/shell/testcases/cache/0005_cache_chain_flush
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+RULESET="add table ip x
+add chain x y
+add chain x z
+add map ip x mapping { type ipv4_addr : inet_service; flags dynamic,timeout; }
+add rule x y counter
+add rule x z counter"
+
+$NFT -f - <<< "$RULESET" 2>&1
+
+RULESET="flush chain x y; add rule x y update @mapping { ip saddr : tcp sport }; flush chain x z"
+
+$NFT "$RULESET" 2>&1