]> Git Repo - linux.git/commit
netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone
authorFlorian Westphal <[email protected]>
Wed, 5 Jan 2022 13:19:54 +0000 (14:19 +0100)
committerPablo Neira Ayuso <[email protected]>
Thu, 6 Jan 2022 09:43:24 +0000 (10:43 +0100)
commit23c54263efd7cb605e2f7af72717a2a951999217
tree3557c86971631656b3b5b5012517af984bd90d2a
parent4e1860a3863707e8177329c006d10f9e37e097a8
netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone

This is needed in case a new transaction is made that doesn't insert any
new elements into an already existing set.

Else, after second 'nft -f ruleset.txt', lookups in such a set will fail
because ->lookup() encounters raw_cpu_ptr(m->scratch) == NULL.

For the initial rule load, insertion of elements takes care of the
allocation, but for rule reloads this isn't guaranteed: we might not
have additions to the set.

Fixes: 3c4287f62044a90e ("nf_tables: Add set type for arbitrary concatenation of ranges")
Reported-by: etkaar <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Reviewed-by: Stefano Brivio <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
net/netfilter/nft_set_pipapo.c
This page took 0.05723 seconds and 4 git commands to generate.