From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Laura Garcia <nevola@gmail.com>
Cc: netfilter-devel@vger.kernel.org, shivanib134@gmail.com,
outreachy-kernel@googlegroups.com
Subject: Re: [PATCHv2] extensions: libip6t_icmp6: Add translation to nft
Date: Mon, 7 Mar 2016 19:25:04 +0100 [thread overview]
Message-ID: <20160307182504.GA7325@salvia> (raw)
In-Reply-To: <20160307180850.GB22851@sonyv>
On Mon, Mar 07, 2016 at 07:08:51PM +0100, Laura Garcia wrote:
> On Mon, Mar 07, 2016 at 06:11:19PM +0100, Pablo Neira Ayuso wrote:
> >
> > #define XT_ICMPV6_TYPE(type) (ND_ROUTER_SOLICIT - type)
> >
> > static const char *icmp6_type_xlate_array[] = {
> > [XT_ICMPV6_TYPE(ND_ROUTER_SOLICIT))] = "nd-router-solicit",
> > [XT_ICMPV6_TYPE(ND_ROUTER_ADVERT)] = "nd-router-advert",
> > ...
> > [XT_ICMPV6_TYPE(ND_REDIRECT)] = "nd-redirect",
> > };
> >
> > static const char *icmp6_type_xlate(unsigned int type)
> > {
> > unsigned type
> >
> > if (type < ND_ROUTER_SOLICIT || type > ND_REDIRECT))
> > return NULL;
> >
> > return icmp6_type_xlate_array[XT_ICMPV6_TYPE(type)];
> > }
> >
> > Then, from type_xlate_print() use this icmp6_type_xlate().
> >
>
> Ok
>
> > > + default:
> > > + for (i = 0; ARRAY_SIZE(icmpv6_codes); ++i)
> > ^
> > BTW, missing opening bracket here
> >
> > > + if (icmpv6_codes[i].type == icmptype &&
> > > + icmpv6_codes[i].code_min == code_min &&
> > > + icmpv6_codes[i].code_max == code_max)
> > > + break;
> > > + xt_xlate_add(xl, icmpv6_codes[i].name);
> >
> > and closing bracket here '}'
> >
> > BTW, do you really need this code now that we just skip when we get an
> > icmp code?
> >
>
> Same thing here, the brackets are not needed. It's only a indentation
> problem in the function xt_xlate_add.
Ok, thanks for explaining.
Please, send a v3 with the proposed changes above and resubmit.
Thanks.
prev parent reply other threads:[~2016-03-07 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-06 22:23 [PATCHv2] extensions: libip6t_icmp6: Add translation to nft Laura Garcia Liebana
2016-03-07 17:11 ` Pablo Neira Ayuso
2016-03-07 18:08 ` Laura Garcia
2016-03-07 18:25 ` 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=20160307182504.GA7325@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nevola@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=shivanib134@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.