From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft 2/4] segtree: set on EXPR_F_KERNEL flag for catchall elements in the cache
Date: Thu, 4 Jul 2024 23:34:21 +0200 [thread overview]
Message-ID: <20240704213423.254356-3-pablo@netfilter.org> (raw)
In-Reply-To: <20240704213423.254356-1-pablo@netfilter.org>
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 | 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
next prev parent reply other threads:[~2024-07-04 21:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 21:34 [PATCH nft 0/4] unbreak element deletion in map with ranges Pablo Neira Ayuso
2024-07-04 21:34 ` [PATCH nft 1/4] evaluate: set on expr->len for catchall set elements Pablo Neira Ayuso
2024-07-04 21:34 ` Pablo Neira Ayuso [this message]
2024-07-04 21:34 ` [PATCH nft 3/4] intervals: fix element deletions with maps Pablo Neira Ayuso
2024-07-04 21:34 ` [PATCH nft 4/4] tests: shell: cover set element deletion in maps Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240704213423.254356-3-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox