[PATCH nft 2/4] segtree: set on EXPR_F_KERNEL flag for catchall elements in the cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Catchall set element deletion requires this flag to be set on,
otherwise it bogusly reports that such element does not exist
in the set.

Fixes: f1cc44edb218 ("src: add EXPR_F_KERNEL to identify expression in the kernel")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/segtree.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/segtree.c b/src/segtree.c
index 5e6f857f85b7..4df96467c3f5 100644
--- a/src/segtree.c
+++ b/src/segtree.c
@@ -629,8 +629,10 @@ void interval_map_decompose(struct expr *set)
 	expr_free(i);
 
 out:
-	if (catchall)
+	if (catchall) {
+		catchall->flags |= EXPR_F_KERNEL;
 		compound_expr_add(set, catchall);
+	}
 
 	free(ranges);
 	free(elements);
-- 
2.30.2





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux