diff options
author | Florian Westphal <fw@strlen.de> | 2022-04-29 20:32:39 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-05-09 09:12:17 +0200 |
commit | d6fdb0d8d4822c0d78667100e6ef0522a3022bd3 (patch) | |
tree | d14c33de5a3cff92672230155c24f580b396f14e /tests/shell/testcases/sets/dumps/sets_with_ifnames.nft | |
parent | 88b2345a215ef4f1fd6a2616f46102f92b01d7c4 (diff) |
sets_with_ifnames: add test case for concatenated range
Refactor existing test case for simple interace name ranges
(without concatenations) to also cover "addr . ifname".
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases/sets/dumps/sets_with_ifnames.nft')
-rw-r--r-- | tests/shell/testcases/sets/dumps/sets_with_ifnames.nft | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft b/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft index 12c1aa96..6b073ae2 100644 --- a/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft +++ b/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft @@ -14,6 +14,21 @@ table inet testifsets { "ppp0" } } + set concat { + type ipv4_addr . ifname + elements = { 10.1.2.2 . "abcdef0", + 10.1.2.2 . "abcdef1" } + } + + set concat_wild { + type ipv4_addr . ifname + flags interval + elements = { 10.1.2.2 . "abcdef*", + 10.1.2.1 . "bar", + 1.1.2.0/24 . "abcdef0", + 12.2.2.0/24 . "abcdef*" } + } + chain v4icmp { iifname @simple counter packets 0 bytes 0 iifname @simple_wild counter packets 0 bytes 0 @@ -21,8 +36,16 @@ table inet testifsets { iifname { "abcdef*", "eth0" } counter packets 0 bytes 0 } + chain v4icmpc { + ip saddr . iifname @concat counter packets 0 bytes 0 + ip saddr . iifname @concat_wild counter packets 0 bytes 0 + ip saddr . iifname { 10.1.2.2 . "abcdef0" } counter packets 0 bytes 0 + ip saddr . iifname { 10.1.2.2 . "abcdef*" } counter packets 0 bytes 0 + } + chain input { type filter hook input priority filter; policy accept; - ip protocol icmp goto v4icmp + ip protocol icmp jump v4icmp + ip protocol icmp goto v4icmpc } } |