diff options
author | Florian Westphal <fw@strlen.de> | 2021-01-30 19:58:42 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-02-22 14:57:49 +0100 |
commit | 4ab1e5e6077918b5b0b4553daa907a725d4cd0fe (patch) | |
tree | 21bb70c5b86ad2d89372c7a7374637886ae19f02 /tests/shell/testcases | |
parent | b9e871cb6f5bf17376955acff55bce264e8355aa (diff) |
src: allow use of 'verdict' in typeof definitions
'verdict' cannot be used as part of a map typeof-based key definition,
its a datatype and not an expression, e.g.:
typeof iifname . ip protocol . th dport : verdic
... will fail.
Make the parser convert a 'verdict' symbol to a verdict expression
and allow to store its presence as part of the typeof key definition.
Reported-by: Frank Myhr <fmyhr@fhmtech.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rw-r--r-- | tests/shell/testcases/maps/dumps/typeof_maps_0.nft | 4 | ||||
-rwxr-xr-x | tests/shell/testcases/maps/typeof_maps_0 | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/dumps/typeof_maps_0.nft b/tests/shell/testcases/maps/dumps/typeof_maps_0.nft index faa73cd1..438b9829 100644 --- a/tests/shell/testcases/maps/dumps/typeof_maps_0.nft +++ b/tests/shell/testcases/maps/dumps/typeof_maps_0.nft @@ -15,6 +15,10 @@ table inet t { 2.3.4.5 . 6.7.8.9 : 0x00000002 } } + map m4 { + typeof iifname . ip protocol . th dport : verdict + } + chain c { ct mark set osf name map @m1 meta mark set vlan id map @m2 diff --git a/tests/shell/testcases/maps/typeof_maps_0 b/tests/shell/testcases/maps/typeof_maps_0 index e1c4bba9..f024ebe0 100755 --- a/tests/shell/testcases/maps/typeof_maps_0 +++ b/tests/shell/testcases/maps/typeof_maps_0 @@ -22,6 +22,10 @@ EXPECTED="table inet t { 2.3.4.5 . 6.7.8.9 : 0x00000002 } } + map m4 { + typeof iifname . ip protocol . th dport : verdict + } + chain c { ct mark set osf name map @m1 ether type vlan meta mark set vlan id map @m2 |