summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2022-08-09 18:23:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 12:09:30 +0300
commit78913e29ab54c47b1f3f3f7553f4f7c13118c621 (patch)
tree532928b58c68121f37951fa39967f216c4653504
parent53d6075164592d2af1b5078e4924ddf2b04b3e78 (diff)
downloadlinux-78913e29ab54c47b1f3f3f7553f4f7c13118c621.tar.xz
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 <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 3fd6dfdeb2f2..4a4dae992936 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -2515,7 +2515,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;