summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/dumps/vmap_timeout.nft
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-08-10 21:48:01 +0200
committerFlorian Westphal <fw@strlen.de>2023-08-13 20:59:14 +0200
commit8b92ee8cd1e8fe9fff1fa8763644a0e118a226ec (patch)
tree22b5aece546a05ef830ec578277780d7c3eee14b /tests/shell/testcases/maps/dumps/vmap_timeout.nft
parentcd9bf74eacc15a3ec2719b6a62cc6b1060734764 (diff)
tests: add test with concatenation, vmap and timeout
Add 4k elements to map, with timeouts in range 1..3s, also add a catchall element with timeout. Check that all elements are no longer included in set list after 4s. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases/maps/dumps/vmap_timeout.nft')
-rw-r--r--tests/shell/testcases/maps/dumps/vmap_timeout.nft29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/dumps/vmap_timeout.nft b/tests/shell/testcases/maps/dumps/vmap_timeout.nft
new file mode 100644
index 00000000..7bbad87c
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/vmap_timeout.nft
@@ -0,0 +1,29 @@
+table inet filter {
+ map portmap {
+ type inet_service : verdict
+ flags timeout
+ elements = { 22 : jump ssh_input }
+ }
+
+ map portaddrmap {
+ typeof ip daddr . th dport : verdict
+ flags timeout
+ elements = { 1.2.3.4 . 22 : jump ssh_input }
+ }
+
+ chain ssh_input {
+ }
+
+ chain other_input {
+ }
+
+ chain wan_input {
+ ip daddr . tcp dport vmap @portaddrmap
+ tcp dport vmap @portmap
+ }
+
+ chain prerouting {
+ type filter hook prerouting priority raw; policy accept;
+ iif vmap { "lo" : jump wan_input }
+ }
+}