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: baikal/mips/sdk6.1~5002^2~12^2~7 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=b08f44f750bfd46fbefec31d79bec925dcdbe678;p=kernel.git netfilter: nf_tables: really skip inactive sets when allocating name 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: 326efd7734fb ("netfilter: nf_tables: add generation mask to sets") Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index d90434eadc1b1..1b9459a364ba7 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -3907,7 +3907,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;