diff options
author | Michael Braun <michael-dev@fami-braun.de> | 2022-07-28 11:36:44 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-08-11 08:03:54 +0200 |
commit | be7be3995a769ae53568a86ba0b6e5469789cec1 (patch) | |
tree | 83bc0adbfe7807b5cf17dd13a5668a0018fc3b34 | |
parent | 132486709b1194c9f4ff721db8d5873838965548 (diff) |
concat with dynamically sized fields like vlan id
This enables commands like
nft set bridge t s4 '{typeof vlan id . ip daddr; elements = { 3567 .
1.2.3.4 }; }'
Which would previously fail with
Error: can not use variable sized data types (integer) in concat
expressions
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r-- | tests/shell/testcases/sets/dumps/typeof_sets_0.nft | 9 | ||||
-rwxr-xr-x | tests/shell/testcases/sets/typeof_sets_0 | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft index 68b4dcc5..6f5b83af 100644 --- a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft +++ b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft @@ -50,6 +50,11 @@ table inet t { elements = { "eth0" . 10.1.1.2 . 42 } } + set s11 { + typeof vlan id . ip saddr + elements = { 3567 . 1.2.3.4 } + } + chain c1 { osf name @s1 accept } @@ -85,4 +90,8 @@ table inet t { chain c10 { iifname . ip saddr . ipsec in reqid @s10 accept } + + chain c11 { + vlan id . ip saddr @s11 accept + } } diff --git a/tests/shell/testcases/sets/typeof_sets_0 b/tests/shell/testcases/sets/typeof_sets_0 index 5fc6a121..9f777a8c 100755 --- a/tests/shell/testcases/sets/typeof_sets_0 +++ b/tests/shell/testcases/sets/typeof_sets_0 @@ -55,6 +55,11 @@ EXPECTED="table inet t { elements = { \"eth0\" . 10.1.1.2 . 42 } } + set s11 { + typeof vlan id . ip saddr + elements = { 3567 . 1.2.3.4 } + } + chain c1 { osf name @s1 accept } @@ -90,6 +95,10 @@ EXPECTED="table inet t { chain c10 { meta iifname . ip saddr . ipsec in reqid @s10 accept } + + chain c11 { + ether type vlan vlan id . ip saddr @s11 accept + } }" set -e |