From: Florian Westphal <fw@strlen.de>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>
Subject: Re: [nf-next PATCH] netfilter: nf_tables: add support for inverted login in nft_lookup
Date: Wed, 1 Jun 2016 10:58:36 +0200 [thread overview]
Message-ID: <20160601085836.GB27858@breakpoint.cc> (raw)
In-Reply-To: <CAOkSjBjGVAzVPz8H3NnF_ZBE934nM4ibQ57dk_Eo9gEiG2aX8A@mail.gmail.com>
Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> wrote:
> On 31 May 2016 at 17:50, Arturo Borrero Gonzalez
> <arturo.borrero.glez@gmail.com> wrote:
> > On 31 May 2016 at 16:44, Florian Westphal <fw@strlen.de> wrote:
> >> I think its better to use a
> >>
> >> } else if (priv->invert) {
> >> return;
> >> }
> >>
>
> Not that easy, we should consider 4 cases:
> * lookup false, invert false -> NFT_BREAK
> * lookup false, invert true -> return w/o NFT_BREAK
> * lookup true, invert false -> return w/o NFT_BREAK
> * lookup true, invert true -> NFT_BREAK
Right...
> The XOR approach in my original patch seems to over these cases, ie,
> we enter the return branch only if lookup&invert are different.
> I think the nft_data_copy() should not worry us if we prevent the
> combination from happening in _init()
Agree, thanks Arturo!
prev parent reply other threads:[~2016-06-01 8:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 11:33 [nf-next PATCH] netfilter: nf_tables: add support for inverted login in nft_lookup Arturo Borrero Gonzalez
2016-05-31 11:39 ` Pablo Neira Ayuso
2016-05-31 14:44 ` Florian Westphal
2016-05-31 15:50 ` Arturo Borrero Gonzalez
2016-05-31 16:18 ` Arturo Borrero Gonzalez
2016-05-31 16:42 ` Arturo Borrero Gonzalez
2016-06-01 8:58 ` Florian Westphal [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=20160601085836.GB27858@breakpoint.cc \
--to=fw@strlen.de \
--cc=arturo.borrero.glez@gmail.com \
--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).