]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_set_rbtree: .deactivate fails if element has expired
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Oct 2023 10:28:27 +0000 (12:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:57 +0000 (11:58 +0200)
commitdb33720697c873b88d53c4b4d4f0eeba82a101ca
tree6f4a2bc6fa81cd5002cbc9cf5b57d6d59303f230
parent44768cad012c4686c0fc2669ff271d984f7bfea7
netfilter: nft_set_rbtree: .deactivate fails if element has expired

commit d111692a59c1470ae530cbb39bcf0346c950ecc7 upstream.

This allows to remove an expired element which is not possible in other
existing set backends, this is more noticeable if gc-interval is high so
expired elements remain in the tree. On-demand gc also does not help in
this case, because this is delete element path. Return NULL if element
has expired.

Fixes: 8d8540c4f5e0 ("netfilter: nft_set_rbtree: add timeout support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_set_rbtree.c