]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
segtree: set on EXPR_F_KERNEL flag for catchall elements in the cache
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2024 12:35:07 +0000 (14:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2024 22:10:47 +0000 (00:10 +0200)
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@netfilter.org>
src/segtree.c

index 5e6f857f85b715025b45920c4afb4c8d90be6e84..4df96467c3f591a77ca2dc681abc4ae37961b10d 100644 (file)
@@ -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);