OSDN Git Service

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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Sep 2018 09:29:49 +0000 (11:29 +0200)
commitcd5125d8f51882279f50506bb9c7e5e89dc9bef3
treebc988cb1c04546178b959a26f16e402a2493f3fc
parent02b408fae3d5552d10d1189fc0bd7e5b1e76af71
netfilter: nf_tables: split set destruction in deactivate and destroy phase

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>
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