From 2fec3ccb17d005b390598dca7837d17613d56d63 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 9 Aug 2022 22:18:14 +0200 Subject: optimize: merging concatenation is unsupported Existing concatenation cannot be merge at this stage, skip them otherwise this assertion is hit: nft: optimize.c:434: rule_build_stmt_matrix_stmts: Assertion `k >= 0' failed Extend existing test to cover this. Signed-off-by: Pablo Neira Ayuso --- src/optimize.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/optimize.c b/src/optimize.c index 2340ef46..419a37f2 100644 --- a/src/optimize.c +++ b/src/optimize.c @@ -352,6 +352,10 @@ static int rule_collect_stmts(struct optimize_ctx *ctx, struct rule *rule) clone->ops = &unsupported_stmt_ops; break; } + if (stmt->expr->left->etype == EXPR_CONCAT) { + clone->ops = &unsupported_stmt_ops; + break; + } case STMT_VERDICT: clone->expr = expr_get(stmt->expr); break; -- cgit v1.2.3