summaryrefslogtreecommitdiffstats
path: root/tests/shell/features/map_lookup.nft
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-09-18 12:28:17 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-18 13:08:40 +0200
commit4a265e4d1a44ed624ed7b4e688ad39352956a0bf (patch)
tree992f85a05cc2b18637974cbe77256d8bf9dcd2a0 /tests/shell/features/map_lookup.nft
parent63af24fc80d1451cdf2d62eecea5e7edb2954123 (diff)
tests/shell: skip map query if kernel lacks support
On recent kernels one can perform a lookup in a map without a destination register (i.e., treat the map like a set -- pure existence check). Add a feature probe and work around the missing feature in typeof_maps_add_delete: do the test with a simplified ruleset, Indicate skipped even though a reduced test was run (earlier errors cause a failure) to not trigger dump validation error. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'tests/shell/features/map_lookup.nft')
-rw-r--r--tests/shell/features/map_lookup.nft11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/features/map_lookup.nft b/tests/shell/features/map_lookup.nft
new file mode 100644
index 00000000..06c4c9d9
--- /dev/null
+++ b/tests/shell/features/map_lookup.nft
@@ -0,0 +1,11 @@
+# a4878eeae390 ("netfilter: nf_tables: relax set/map validation checks")
+# v6.5-rc1~163^2~256^2~8
+table ip t {
+ map m {
+ typeof ip daddr : meta mark
+ }
+
+ chain c {
+ ip saddr @m
+ }
+}