summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-06-21 01:12:15 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2016-06-24 12:03:26 +0300
commit4e5001651f5e488eac378ebabc5bde2a8f1ea861 (patch)
tree129316ac4883cfe54d9331a41e093910f5f6c6d3 /net/netfilter
parent37a9cc52552579f22e18cca401cfc4351b6cbc72 (diff)
downloadlinux-4e5001651f5e488eac378ebabc5bde2a8f1ea861.tar.xz
netfilter: nft_rbtree: check for next generation when deactivating elements
set->ops->deactivate() is invoked from nft_del_setelem() that happens from the transaction path, so we have to check if the object is active in the next generation, not the current. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nft_rbtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_rbtree.c b/net/netfilter/nft_rbtree.c
index f762094af7c1..86fbe5e68d28 100644
--- a/net/netfilter/nft_rbtree.c
+++ b/net/netfilter/nft_rbtree.c
@@ -170,7 +170,7 @@ static void *nft_rbtree_deactivate(const struct nft_set *set,
const struct nft_rbtree *priv = nft_set_priv(set);
const struct rb_node *parent = priv->root.rb_node;
struct nft_rbtree_elem *rbe, *this = elem->priv;
- u8 genmask = nft_genmask_cur(read_pnet(&set->pnet));
+ u8 genmask = nft_genmask_next(read_pnet(&set->pnet));
int d;
while (parent != NULL) {