]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
evaluate: mappings require set expression
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 Jul 2025 22:14:44 +0000 (00:14 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 9 Jul 2025 22:13:04 +0000 (00:13 +0200)
While EXPR_CONCAT and EXPR_LIST share the same layout in struct expr,
these expressions are not possible at this stage.

Fall back to error out with "invalid mapping expression".

Fixes: 02d44b4f9917 ("evaluate: fix expression data corruption")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c

index a2d5d7c29514fa98e86ac805b1bc06840937a319..83381b4ef3d0891b1564f11bbfef3ffc2ef01320 100644 (file)
@@ -2211,8 +2211,6 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr)
        mappings = map->mappings;
 
        switch (map->mappings->etype) {
-       case EXPR_CONCAT:
-       case EXPR_LIST:
        case EXPR_SET:
                set_flags |= mappings->set_flags;
                /* fallthrough */