From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: phil@nwl.cc
Subject: [PATCH nft 2/2] segtree: restore automerge
Date: Tue, 26 Nov 2019 11:34:22 +0100 [thread overview]
Message-ID: <20191126103422.29501-2-pablo@netfilter.org> (raw)
In-Reply-To: <20191126103422.29501-1-pablo@netfilter.org>
Always close interval in non-anonymous sets unless the auto-merge
feature is set on.
Fixes: a4ec05381261 ("segtree: always close interval in non-anonymous sets")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
Hi Phil,
this patch also supersedes https://patchwork.ozlabs.org/patch/1198896/.
Thanks.
src/segtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/segtree.c b/src/segtree.c
index 50e34050c167..b3c61fb088a5 100644
--- a/src/segtree.c
+++ b/src/segtree.c
@@ -497,7 +497,7 @@ static void segtree_linearize(struct list_head *list, const struct set *set,
*/
mpz_add_ui(p, prev->right, 1);
if (mpz_cmp(p, ei->left) < 0 ||
- !(set->flags & NFT_SET_ANONYMOUS)) {
+ (!(set->flags & NFT_SET_ANONYMOUS) && !merge)) {
mpz_sub_ui(q, ei->left, 1);
nei = ei_alloc(p, q, NULL, EI_F_INTERVAL_END);
list_add_tail(&nei->list, list);
--
2.11.0
next prev parent reply other threads:[~2019-11-26 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 10:34 [PATCH nft 1/2] Revert "segtree: Check ranges when deleting elements" Pablo Neira Ayuso
2019-11-26 10:34 ` Pablo Neira Ayuso [this message]
2019-11-26 12:09 ` [PATCH nft 2/2] segtree: restore automerge Phil Sutter
2019-11-26 18:37 ` 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=20191126103422.29501-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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;
as well as URLs for NNTP newsgroup(s).