diff options
author | Florian Westphal <fw@strlen.de> | 2022-08-01 13:03:18 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-08-05 01:46:39 +0200 |
commit | b1e3ed0335d13d206a2a2698a1ba189fa396dbf3 (patch) | |
tree | 51609a4e474e915ad6e851eab0fbca82d2b38c8c /tests/shell | |
parent | f680055cd4377f2f531f5f77b3aaa7550988665d (diff) |
netlink_delinearize: also postprocess OP_AND in set element context
Pablo reports:
add rule netdev nt y update @macset { vlan id timeout 5s }
listing still shows the raw expression:
update @macset { @ll,112,16 & 0xfff timeout 5s }
so also cover the 'set element' case.
Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell')
-rw-r--r-- | tests/shell/testcases/sets/dumps/0070stacked_l2_headers.nft | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/dumps/0070stacked_l2_headers.nft b/tests/shell/testcases/sets/dumps/0070stacked_l2_headers.nft index ef254b96..0057e9c6 100644 --- a/tests/shell/testcases/sets/dumps/0070stacked_l2_headers.nft +++ b/tests/shell/testcases/sets/dumps/0070stacked_l2_headers.nft @@ -1,14 +1,28 @@ table netdev nt { + set vlanidset { + typeof vlan id + size 1024 + flags dynamic,timeout + } + set macset { typeof ether saddr . vlan id size 1024 flags dynamic,timeout } + set ipset { + typeof vlan id . ip saddr + size 1024 + flags dynamic,timeout + } + chain nc { update @macset { ether saddr . vlan id timeout 5s } counter packets 0 bytes 0 ether saddr . vlan id @macset vlan pcp 1 ether saddr 0a:0b:0c:0d:0e:0f vlan id 42 + update @vlanidset { vlan id timeout 5s } counter packets 0 bytes 0 + update @ipset { vlan id . ip saddr timeout 5s } counter packets 0 bytes 0 } } |