From: Pablo Neira Ayuso Date: Tue, 9 Aug 2022 15:23:53 +0000 (+0200) Subject: netfilter: nf_tables: really skip inactive sets when allocating name X-Git-Tag: v5.15.73~888 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a6775ede639fc01d84e8197e46aca8459ab41a4;p=platform%2Fkernel%2Flinux-rpi.git netfilter: nf_tables: really skip inactive sets when allocating name commit 271c5ca826e0c3c53e0eb4032f8eaedea1ee391c upstream. While looping to build the bitmap of used anonymous set names, check the current set in the iteration, instead of the one that is being created. Fixes: 37a9cc525525 ("netfilter: nf_tables: add generation mask to sets") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index a65727c..0ec525e 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -3810,7 +3810,7 @@ cont: list_for_each_entry(i, &ctx->table->sets, list) { int tmp; - if (!nft_is_active_next(ctx->net, set)) + if (!nft_is_active_next(ctx->net, i)) continue; if (!sscanf(i->name, name, &tmp)) continue;