From 8b92ee8cd1e8fe9fff1fa8763644a0e118a226ec Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 10 Aug 2023 21:48:01 +0200 Subject: 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 --- tests/shell/testcases/maps/dumps/vmap_timeout.nft | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/shell/testcases/maps/dumps/vmap_timeout.nft (limited to 'tests/shell/testcases/maps/dumps/vmap_timeout.nft') 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 } + } +} -- cgit v1.2.3