netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laura Garcia <nevola@gmail.com>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH v3] extensions: libxt_multiport: Add translation to nft
Date: Wed, 1 Jun 2016 22:16:18 +0200	[thread overview]
Message-ID: <20160601201614.GA24726@sonyv> (raw)
In-Reply-To: <CAOkSjBiGUCk83+Muwc6naTUJXTXgK7s0Bi+fvcCB6=WW50dxQQ@mail.gmail.com>

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.


  reply	other threads:[~2016-06-01 20:16 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 [this message]
2016-06-02 10:52     ` 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=20160601201614.GA24726@sonyv \
    --to=nevola@gmail.com \
    --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).