netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, anon.amish@gmail.com
Subject: Re: [nft PATCH v2] evaluate: Accept ranges of N-N
Date: Fri, 5 Jul 2019 15:04:32 +0200	[thread overview]
Message-ID: <20190705130432.GE1628@orbyte.nwl.cc> (raw)
In-Reply-To: <20190705125847.toc2sba27pcqywpo@salvia>

On Fri, Jul 05, 2019 at 02:58:47PM +0200, Pablo Neira Ayuso wrote:
> On Fri, Jul 05, 2019 at 02:15:05PM +0200, Phil Sutter wrote:
> > Trying to add a range of size 1 was previously not allowed:
> > 
> > | # nft add element ip t s '{ 40-40 }'
> > | Error: Range has zero or negative size
> > | add element ip t s { 40-40 }
> > |                      ^^^^^
> > 
> > The error message is not correct: If a range 40-41 is of size 2 (it
> > contains elements 40 and 41), a range 40-40 must be of size 1.
> > 
> > Handling this is even supported already: If a single element is added to
> > an interval set, it is converted into just this range. The implication
> > is that on output, previous input of '40-40' is indistinguishable from
> > single element input '40'.
> 
> What kind of human is going to generate such range? :-)

According to the ticket, some scripts do. :)

> I think we can place this item in the "nft ruleset optimization"
> discussion during the NFWS.

Sure, I'll add a note to the proposal.

Thanks, Phil

      reply	other threads:[~2019-07-05 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 12:15 [nft PATCH v2] evaluate: Accept ranges of N-N Phil Sutter
2019-07-05 12:58 ` Pablo Neira Ayuso
2019-07-05 13:04   ` Phil Sutter [this message]

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=20190705130432.GE1628@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=anon.amish@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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;
as well as URLs for NNTP newsgroup(s).