]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
evaluate: fix rule replacement with anon sets
authorFlorian Westphal <fw@strlen.de>
Sun, 19 Nov 2023 12:05:55 +0000 (13:05 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 20 Nov 2023 13:11:12 +0000 (14:11 +0100)
nft replace rule t c handle 3 'jhash ip protocol . ip saddr mod 170 vmap { 0-94 : goto wan1, 95-169 : goto wan2, 170-269 }"'
BUG: unhandled op 2
nft: src/evaluate.c:1748: interval_set_eval: Assertion `0' failed.

Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
Reported-by: Tino Reichardt <milky-netfilter@mcmilk.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c

index d1ec6ec4a74db5a71485cc7764a01b70a08fe8e0..13b6a603de22dd2726b17830ebf6c93f3c8de8ba 100644 (file)
@@ -1729,6 +1729,7 @@ static int interval_set_eval(struct eval_ctx *ctx, struct set *set,
        switch (ctx->cmd->op) {
        case CMD_CREATE:
        case CMD_ADD:
+       case CMD_REPLACE:
        case CMD_INSERT:
                if (set->automerge) {
                        ret = set_automerge(ctx->msgs, ctx->cmd, set, init,