From: Matthias Kaehlcke <mka@chromium.org>
To: Joe Perches <joe@perches.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
"David S . Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Grant Grundler <grundler@chromium.org>,
Greg Hackmann <ghackmann@google.com>,
Michael Davidson <md@google.com>
Subject: Re: [PATCH] netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch
Date: Wed, 19 Apr 2017 12:59:14 -0700 [thread overview]
Message-ID: <20170419195914.GG128305@google.com> (raw)
In-Reply-To: <1492630870.30293.3.camel@perches.com>
El Wed, Apr 19, 2017 at 12:41:10PM -0700 Joe Perches ha dit:
> On Wed, 2017-04-19 at 11:39 -0700, Matthias Kaehlcke wrote:
> > Not all parameters passed to ctnetlink_parse_tuple() and
> > ctnetlink_exp_dump_tuple() match the enum type in the signatures of these
> > functions.
>
> Maybe that should be changed/fixed.
Please see the previous discussion at
http://www.spinics.net/lists/netfilter-devel/msg47540.html
> > Since this is intended change the argument type of to be an int
> > value.
>
> u32 is not int, it's unsigned int
I would argue that an unsigned int is an int(eger) and considered it
an unnecessary detail for the commit message to be explicit. I can
change it if others deem it incorrect.
Cheers
Matthias
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> > net/netfilter/nf_conntrack_netlink.c | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
> > index dc7dfd68fafe..775eb5d9165b 100644
> > --- a/net/netfilter/nf_conntrack_netlink.c
> > +++ b/net/netfilter/nf_conntrack_netlink.c
> > @@ -1006,9 +1006,8 @@ static const struct nla_policy tuple_nla_policy[CTA_TUPLE_MAX+1] = {
> >
> > static int
> > ctnetlink_parse_tuple(const struct nlattr * const cda[],
> > - struct nf_conntrack_tuple *tuple,
> > - enum ctattr_type type, u_int8_t l3num,
> > - struct nf_conntrack_zone *zone)
> > + struct nf_conntrack_tuple *tuple, u32 type,
> > + u_int8_t l3num, struct nf_conntrack_zone *zone)
> > {
> > struct nlattr *tb[CTA_TUPLE_MAX+1];
> > int err;
> > @@ -2443,7 +2442,7 @@ static struct nfnl_ct_hook ctnetlink_glue_hook = {
> >
> > static int ctnetlink_exp_dump_tuple(struct sk_buff *skb,
> > const struct nf_conntrack_tuple *tuple,
> > - enum ctattr_expect type)
> > + u32 type)
> > {
> > struct nlattr *nest_parms;
> >
next prev parent reply other threads:[~2017-04-19 19:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 18:39 [PATCH] netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch Matthias Kaehlcke
2017-04-19 19:41 ` Joe Perches
2017-04-19 19:59 ` Matthias Kaehlcke [this message]
2017-05-01 18:07 ` Matthias Kaehlcke
2017-05-02 9:58 ` 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=20170419195914.GG128305@google.com \
--to=mka@chromium.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=ghackmann@google.com \
--cc=grundler@chromium.org \
--cc=joe@perches.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=md@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).