* [PATCH nftables] evaluate: add set to cache once
@ 2021-06-14 12:24 Pablo Neira Ayuso
2021-06-14 12:41 ` Phil Sutter
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2021-06-14 12:24 UTC (permalink / raw)
To: netfilter-devel; +Cc: phil
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 broken 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 | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/evaluate.c b/src/evaluate.c
index 5311963a20c5..92cc8994c809 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nftables] evaluate: add set to cache once
2021-06-14 12:24 [PATCH nftables] evaluate: add set to cache once Pablo Neira Ayuso
@ 2021-06-14 12:41 ` Phil Sutter
0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2021-06-14 12:41 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On Mon, Jun 14, 2021 at 02:24:54PM +0200, Pablo Neira Ayuso wrote:
> 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 broken 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>
Thanks for the quick fix!
Out of curiosity, did you not use set_is_anonymous() in commit
bbcc5eda7e588 on purpose?
Cheers, Phil
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-14 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 12:24 [PATCH nftables] evaluate: add set to cache once Pablo Neira Ayuso
2021-06-14 12:41 ` Phil Sutter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.