netfilter: nft_set_hash: mark set element as dead when deleting from packet path
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 9 Aug 2023 13:00:06 +0000 (15:00 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 10 Aug 2023 06:25:27 +0000 (08:25 +0200)
commitc92db3030492b8ad1d0faace7a93bbcf53850d0c
tree0f20b48397ad4c53a064547467ea5efbd001f0f9
parentf6c383b8c31a93752a52697f8430a71dcbc46adf
netfilter: nft_set_hash: mark set element as dead when deleting from packet path

Set on the NFT_SET_ELEM_DEAD_BIT flag on this element, instead of
performing element removal which might race with an ongoing transaction.
Enable gc when dynamic flag is set on since dynset deletion requires
garbage collection after this patch.

Fixes: d0a8d877da97 ("netfilter: nft_dynset: support for element deletion")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_hash.c