From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Alvaro Neira Ayuso <alvaroneay@gmail.com>,
netfilter-devel@vger.kernel.org
Subject: Re: [nftables PATCH v2] netlink: Allow to invert the ranges
Date: Thu, 5 Jun 2014 17:01:26 +0200 [thread overview]
Message-ID: <20140605150125.GA25244@localhost> (raw)
In-Reply-To: <20140601202006.GB19396@macbook.localnet>
On Sun, Jun 01, 2014 at 09:20:07PM +0100, Patrick McHardy wrote:
> On Wed, May 28, 2014 at 12:08:22PM +0200, Alvaro Neira Ayuso wrote:
> > From: Álvaro Neira Ayuso <alvaroneay@gmail.com>
> >
> > This patch fix the bug:
> >
> > http://bugzilla.netfilter.org/show_bug.cgi?id=924
> >
> > Before, nftables doesn't permit invert ranges. This patch allows
> > add rules like this:
> >
> > nft add rule ip test input ip daddr != 192.168.1.2-192.168.1.55
> > or
> > nft add rule ip test input ip daddr == 192.168.1.2-192.168.1.55
> >
> > Also, we still have the option for adding rules like this:
> >
> > sudo nft add rule ip test output frag id 33-45
> >
> > Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
> > ---
> > [changes in v2]
> > * I have added OP_RANGE in netlink_gen_range. I have supposed that always
> > we have a comparison before the range and I have forbidden to add rules
> > with ranges without comparison symbol (== or !=).
>
> That seems fine. The implicit op for ranges is OP_EQ.
>
> The patch looks fine to me. Minor improvement might be to factor out the common
> code from netlink_gen_range(), but might not be worth it.
I have applied this, we can revisit this later. Thanks Alvaro and
Patrick.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-06-05 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 17:15 [nftables PATCH] netlink: Allow invert the ranges Alvaro Neira Ayuso
2014-05-28 10:08 ` [nftables PATCH v2] netlink: Allow to " Alvaro Neira Ayuso
2014-06-01 20:20 ` Patrick McHardy
2014-06-05 15:01 ` Pablo Neira Ayuso [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=20140605150125.GA25244@localhost \
--to=pablo@netfilter.org \
--cc=alvaroneay@gmail.com \
--cc=kaber@trash.net \
--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;
as well as URLs for NNTP newsgroup(s).