summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2022-11-05 16:51:10 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2022-11-05 16:54:26 +0100
commita61df019861997df76159b780070e2a09038798f (patch)
tree5ff3ec90af0b3eacdd6f74694618b2714bc50315 /tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft
parentc8a3c669499d169fef8c1e89b8d2d909e5ecd023 (diff)
optimize: handle prefix and range when merging into set + concatenation
The following ruleset fails to be merged using set + concatenation: meta iifname eth1 ip saddr 1.1.1.2 ip daddr 2.2.3.0/24 accept meta iifname eth1 ip saddr 1.1.1.2 ip daddr 2.2.4.0-2.2.4.10 accept hitting the following assertion: nft: optimize.c:585: __merge_concat_stmts: Assertion `0' failed. Abort This patch also updates tests/shell. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft')
-rw-r--r--tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft b/tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft
index 5d03cf8d..f56cea1c 100644
--- a/tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft
+++ b/tests/shell/testcases/optimizations/dumps/merge_stmts_concat.nft
@@ -1,6 +1,6 @@
table ip x {
chain y {
- iifname . ip saddr . ip daddr { "eth1" . 1.1.1.1 . 2.2.2.3, "eth1" . 1.1.1.2 . 2.2.2.4, "eth2" . 1.1.1.3 . 2.2.2.5 } accept
+ iifname . ip saddr . ip daddr { "eth1" . 1.1.1.1 . 2.2.2.3, "eth1" . 1.1.1.2 . 2.2.2.4, "eth1" . 1.1.1.2 . 2.2.3.0/24, "eth1" . 1.1.1.2 . 2.2.4.0-2.2.4.10, "eth2" . 1.1.1.3 . 2.2.2.5 } accept
ip protocol . th dport { tcp . 22, udp . 67 }
}