netfilter: nf_tables: split set destruction in deactivate and destroy phase
authorFlorian Westphal <fw@strlen.de>
Wed, 29 Aug 2018 12:41:30 +0000 (14:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 07:58:50 +0000 (09:58 +0200)
commit3dbba8ebb066261559f20382add0f7207a26a773
tree1b32af3b982339e2846b5462e3a84e49646271f9
parent7693bae6b3145f90722d9a4507cf7443db8b5dfb
netfilter: nf_tables: split set destruction in deactivate and destroy phase

[ Upstream commit cd5125d8f51882279f50506bb9c7e5e89dc9bef3 ]

Splits unbind_set into destroy_set and unbinding operation.

Unbinding removes set from lists (so new transaction would not
find it anymore) but keeps memory allocated (so packet path continues
to work).

Rebind function is added to allow unrolling in case transaction
that wants to remove set is aborted.

Destroy function is added to free the memory, but this could occur
outside of transaction in the future.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_dynset.c
net/netfilter/nft_lookup.c
net/netfilter/nft_objref.c