From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Laura Garcia <nevola@gmail.com>
Cc: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>,
Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH v3] extensions: libxt_multiport: Add translation to nft
Date: Thu, 2 Jun 2016 12:52:02 +0200 [thread overview]
Message-ID: <20160602105202.GB2720@salvia> (raw)
In-Reply-To: <20160601201614.GA24726@sonyv>
On Wed, Jun 01, 2016 at 10:16:18PM +0200, Laura Garcia wrote:
> On Wed, Jun 01, 2016 at 04:43:45PM +0200, Arturo Borrero Gonzalez wrote:
> > On 31 May 2016 at 20:26, Laura Garcia Liebana <nevola@gmail.com> wrote:
> > > +static int __multiport_xlate_v1(const void *ip,
> > > + const struct xt_entry_match *match,
> > > + struct xt_xlate *xl, int numeric)
> > > +{
> > > + const struct xt_multiport_v1 *multiinfo
> > > + = (const struct xt_multiport_v1 *)match->data;
> > > + unsigned int i;
> > > +
> > > + switch (multiinfo->flags) {
> > > + case XT_MULTIPORT_SOURCE:
> > > + xt_xlate_add(xl, "sport ");
> > > + break;
> > > + case XT_MULTIPORT_DESTINATION:
> > > + xt_xlate_add(xl, "dport ");
> > > + break;
> > > + case XT_MULTIPORT_EITHER:
> > > + return 0;
> > > + }
> > > +
> > > + if (multiinfo->invert)
> > > + xt_xlate_add(xl, "!= ");
> > > +
> > > + if (multiinfo->count > 2 ||
> > > + (multiinfo->count > 1 && !multiinfo->pflags[0])) {
> > > + xt_xlate_add(xl, "{ ");
> > > + if (multiinfo->invert)
> > > + return 0;
> > > + }
> > > +
> >
> > I fail to understand this return here
> >
> > Other than that, the patch looks good.
> >
>
> It's only to return a non-translation available for the != {} thing
> until is supported in nft.
I'd suggest you provide this already given that we'll soon have
support for this in nft.
Thanks.
prev parent reply other threads:[~2016-06-02 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 18:26 [PATCH v3] extensions: libxt_multiport: Add translation to nft Laura Garcia Liebana
2016-06-01 14:43 ` Arturo Borrero Gonzalez
2016-06-01 20:16 ` Laura Garcia
2016-06-02 10:52 ` 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=20160602105202.GB2720@salvia \
--to=pablo@netfilter.org \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=nevola@gmail.com \
/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).