netfilter: nf_tables: really skip inactive sets when allocating name
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Aug 2022 15:23:53 +0000 (17:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:22 +0000 (11:40 +0200)
commit8a6775ede639fc01d84e8197e46aca8459ab41a4
tree3e3cd1a2ab8e9f75ba138207636a613aea7eacee
parentb59bee8b05b0e789b5a298cacb09e8aaa3367a29
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>
net/netfilter/nf_tables_api.c