OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29b0b5d
)
netfilter: nft_set_rbtree: check for inactive element after flag mismatch
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Tue, 12 Mar 2019 11:10:59 +0000
(12:10 +0100)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Mon, 18 Mar 2019 15:21:09 +0000
(16:21 +0100)
Otherwise, we hit bogus ENOENT when removing elements.
Fixes:
e701001e7cbe
("netfilter: nft_rbtree: allow adjacent intervals with dynamic updates")
Reported-by: Václav Zindulka <vaclav.zindulka@tlapnet.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_rbtree.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nft_set_rbtree.c
b/net/netfilter/nft_set_rbtree.c
index
fa61208
..
321a003
100644
(file)
--- a/
net/netfilter/nft_set_rbtree.c
+++ b/
net/netfilter/nft_set_rbtree.c
@@
-308,10
+308,6
@@
static void *nft_rbtree_deactivate(const struct net *net,
else if (d > 0)
parent = parent->rb_right;
else {
- if (!nft_set_elem_active(&rbe->ext, genmask)) {
- parent = parent->rb_left;
- continue;
- }
if (nft_rbtree_interval_end(rbe) &&
!nft_rbtree_interval_end(this)) {
parent = parent->rb_left;
@@
-320,6
+316,9
@@
static void *nft_rbtree_deactivate(const struct net *net,
nft_rbtree_interval_end(this)) {
parent = parent->rb_right;
continue;
+ } else if (!nft_set_elem_active(&rbe->ext, genmask)) {
+ parent = parent->rb_left;
+ continue;
}
nft_rbtree_flush(net, set, rbe);
return rbe;