From: Stefano Brivio <sbrivio@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf v2 4/4] nft_set_rbtree: Detect partial overlaps on insertion
Date: Tue, 31 Mar 2020 22:33:42 +0200 [thread overview]
Message-ID: <20200331223342.03e5f9e6@elisabeth> (raw)
In-Reply-To: <20200331201209.trdh3b4r3a5fd2fe@salvia>
On Tue, 31 Mar 2020 22:12:27 +0200
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Hi Stefano,
>
> On Sun, Mar 22, 2020 at 03:22:01AM +0100, Stefano Brivio wrote:
> > ...and return -ENOTEMPTY to the front-end in this case, instead of
> > proceeding. Currently, nft takes care of checking for these cases
> > and not sending them to the kernel, but if we drop the set_overlap()
> > call in nft we can end up in situations like:
> >
> > # nft add table t
> > # nft add set t s '{ type inet_service ; flags interval ; }'
> > # nft add element t s '{ 1 - 5 }'
> > # nft add element t s '{ 6 - 10 }'
> > # nft add element t s '{ 4 - 7 }'
> > # nft list set t s
> > table ip t {
> > set s {
> > type inet_service
> > flags interval
> > elements = { 1-3, 4-5, 6-7 }
> > }
> > }
> >
> > This change has the primary purpose of making the behaviour
> > consistent with nft_set_pipapo, but is also functional to avoid
> > inconsistent behaviour if userspace sends overlapping elements for
> > any reason.
>
> nftables/tests/py is reporting a regression that is related to this
> patch. If I locally revert this patch here, tests/py works fine here.
Grrr, did I really run tests/shell only after this... :(
Sorry, I'm on it.
--
Stefano
next prev parent reply other threads:[~2020-03-31 20:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 2:21 [PATCH nf v2 0/4] nftables: Consistently report partial and entire set overlaps Stefano Brivio
2020-03-22 2:21 ` [PATCH nf v2 1/4] nf_tables: Allow set back-ends to report partial overlaps on insertion Stefano Brivio
2020-03-22 2:21 ` [PATCH nf v2 2/4] nft_set_pipapo: Separate partial and complete overlap cases " Stefano Brivio
2020-03-22 2:22 ` [PATCH nf v2 3/4] nft_set_rbtree: Introduce and use nft_rbtree_interval_start() Stefano Brivio
2020-03-22 2:22 ` [PATCH nf v2 4/4] nft_set_rbtree: Detect partial overlaps on insertion Stefano Brivio
2020-03-31 20:12 ` Pablo Neira Ayuso
2020-03-31 20:33 ` Stefano Brivio [this message]
2020-03-24 19:01 ` [PATCH nf v2 0/4] nftables: Consistently report partial and entire set overlaps 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=20200331223342.03e5f9e6@elisabeth \
--to=sbrivio@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.