From 4a265e4d1a44ed624ed7b4e688ad39352956a0bf Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 18 Sep 2023 12:28:17 +0200 Subject: 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 Signed-off-by: Thomas Haller --- tests/shell/features/map_lookup.nft | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/shell/features/map_lookup.nft (limited to 'tests/shell/features/map_lookup.nft') 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 + } +} -- cgit v1.2.3