netfilter: nft_set_pipapo: .walk does not deal with generations
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 16 Jun 2023 13:20:04 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:32 +0000 (11:12 +0200)
commit0d836f917520300a8725a5dbdad4406438d0cead
tree10b9961f2bcd53c54d312846aa21ae17fe6d9981
parentd60be2da67d172aecf866302c91ea11533eca4d9
netfilter: nft_set_pipapo: .walk does not deal with generations

[ Upstream commit 2b84e215f87443c74ac0aa7f76bb172d43a87033 ]

The .walk callback iterates over the current active set, but it might be
useful to iterate over the next generation set. Use the generation mask
to determine what set view (either current or next generation) is use
for the walk iteration.

Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_set_pipapo.c