summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-04-18 00:00:18 +0200
committerFlorian Westphal <fw@strlen.de>2022-04-18 15:32:09 +0200
commit721b9dec5499b0a06a1b7a30c2a989cdc712a344 (patch)
tree4e7a3ea1ae88f4af274200640fa498bf50e3e9e1 /tests/shell/testcases/maps
parent22b750aa6dc9780c19b9dbe00f9a9e5bb83ea08b (diff)
tests: add concat test case with integer base type subkey
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases/maps')
-rw-r--r--tests/shell/testcases/maps/dumps/typeof_maps_0.nft6
-rwxr-xr-xtests/shell/testcases/maps/typeof_maps_06
2 files changed, 12 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 ea411335..a5c0a609 100644
--- a/tests/shell/testcases/maps/dumps/typeof_maps_0.nft
+++ b/tests/shell/testcases/maps/dumps/typeof_maps_0.nft
@@ -20,11 +20,17 @@ table inet t {
elements = { "eth0" . tcp . 22 : accept }
}
+ map m5 {
+ typeof ipsec in reqid . iifname : verdict
+ elements = { 23 . "eth0" : accept }
+ }
+
chain c {
ct mark set osf name map @m1
meta mark set vlan id map @m2
meta mark set ip saddr . ip daddr map @m3
iifname . ip protocol . th dport vmap @m4
iifname . ip protocol . th dport vmap { "eth0" . tcp . 22 : accept, "eth1" . udp . 67 : drop }
+ ipsec in reqid . iifname vmap @m5
}
}
diff --git a/tests/shell/testcases/maps/typeof_maps_0 b/tests/shell/testcases/maps/typeof_maps_0
index 1014d811..5cf5ddde 100755
--- a/tests/shell/testcases/maps/typeof_maps_0
+++ b/tests/shell/testcases/maps/typeof_maps_0
@@ -27,12 +27,18 @@ EXPECTED="table inet t {
elements = { eth0 . tcp . 22 : accept }
}
+ map m5 {
+ typeof ipsec in reqid . meta iifname : verdict
+ elements = { 23 . eth0 : accept }
+ }
+
chain c {
ct mark set osf name map @m1
ether type vlan meta mark set vlan id map @m2
meta mark set ip saddr . ip daddr map @m3
iifname . ip protocol . th dport vmap @m4
iifname . ip protocol . th dport vmap { \"eth0\" . tcp . 22 : accept, \"eth1\" . udp . 67 : drop }
+ ipsec in reqid . meta iifname vmap @m5
}
}"