summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2022-06-27 12:54:23 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-06-27 12:54:43 +0200
commit6c23bfa512187d509ecc188653a6f232b0695d1d (patch)
tree67e4dd93dfe3962c455c01f8d8a8ed784dabac46 /tests
parent8623772af06103ed4ccca3d07e55afbf3d952d6d (diff)
segtree: fix map listing with interface wildcard
# nft -f - <<'EOF' table inet filter { chain INPUT { iifname vmap { "eth0" : jump input_lan, "wg*" : jump input_vpn } } chain input_lan {} chain input_vpn {} } EOF # nft list ruleset nft: segtree.c:578: interval_map_decompose: Assertion `low->len / 8 > 0' failed. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1617 Fixes: 5e393ea1fc0a ("segtree: add string "range" reversal support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/shell/testcases/sets/dumps/sets_with_ifnames.nft11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft b/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft
index 6b073ae2..77a8baf5 100644
--- a/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft
+++ b/tests/shell/testcases/sets/dumps/sets_with_ifnames.nft
@@ -29,11 +29,19 @@ table inet testifsets {
12.2.2.0/24 . "abcdef*" }
}
+ map map_wild {
+ type ifname : verdict
+ flags interval
+ elements = { "abcdef*" : jump do_nothing,
+ "eth0" : jump do_nothing }
+ }
+
chain v4icmp {
iifname @simple counter packets 0 bytes 0
iifname @simple_wild counter packets 0 bytes 0
iifname { "eth0", "abcdef0" } counter packets 0 bytes 0
iifname { "abcdef*", "eth0" } counter packets 0 bytes 0
+ iifname vmap @map_wild
}
chain v4icmpc {
@@ -48,4 +56,7 @@ table inet testifsets {
ip protocol icmp jump v4icmp
ip protocol icmp goto v4icmpc
}
+
+ chain do_nothing {
+ }
}