@@ -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
}
}
@@ -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
}
}"
@@ -45,6 +45,11 @@ table inet t {
15 }
}
+ set s10 {
+ typeof iifname . ip saddr . ipsec in reqid
+ elements = { "eth0" . 10.1.1.2 . 42 }
+ }
+
chain c1 {
osf name @s1 accept
}
@@ -76,4 +81,8 @@ table inet t {
chain c9 {
ip hdrlength @s9 accept
}
+
+ chain c10 {
+ iifname . ip saddr . ipsec in reqid @s10 accept
+ }
}
@@ -50,6 +50,11 @@ EXPECTED="table inet t {
elements = { 0, 1, 2, 3, 4, 15 }
}
+ set s10 {
+ typeof meta iifname . ip saddr . ipsec in reqid
+ elements = { \"eth0\" . 10.1.1.2 . 42 }
+ }
+
chain c1 {
osf name @s1 accept
}
@@ -81,6 +86,10 @@ EXPECTED="table inet t {
chain c9 {
ip hdrlength @s9 accept
}
+
+ chain c10 {
+ meta iifname . ip saddr . ipsec in reqid @s10 accept
+ }
}"
set -e
Signed-off-by: Florian Westphal <fw@strlen.de> --- tests/shell/testcases/maps/dumps/typeof_maps_0.nft | 6 ++++++ tests/shell/testcases/maps/typeof_maps_0 | 6 ++++++ tests/shell/testcases/sets/dumps/typeof_sets_0.nft | 9 +++++++++ tests/shell/testcases/sets/typeof_sets_0 | 9 +++++++++ 4 files changed, 30 insertions(+)