]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
evaluate: add set to cache once
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jun 2021 12:05:09 +0000 (14:05 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jun 2021 17:24:44 +0000 (19:24 +0200)
67d3969a7244 ("evaluate: add set to the cache") re-adds the set into the
cache again.

This bug was hidden behind 5ec5c706d993 ("cache: add hashtable cache for
table") which broke set_evaluate() for anonymous sets.

Phil reported a gcc compilation warning which uncovered this problem.

Reported-by: Phil Sutter <phil@nwl.cc>
Fixes: 67d3969a7244 ("evaluate: add set to the cache")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c

index 5863fc8213ab273f104f7ad96387b8206682361d..4397bacf662b0e265dd516d0e2f1d7e65267bb80 100644 (file)
@@ -3867,9 +3867,6 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set)
        }
        ctx->set = NULL;
 
-       if (set_cache_find(table, set->handle.set.name) == NULL)
-               set_cache_add(set_get(set), table);
-
        return 0;
 }