[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1492630870.30293.3.camel@perches.com>
Date: Wed, 19 Apr 2017 12:41:10 -0700
From: Joe Perches <joe@...ches.com>
To: Matthias Kaehlcke <mka@...omium.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
"David S . Miller" <davem@...emloft.net>
Cc: netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Grant Grundler <grundler@...omium.org>,
Greg Hackmann <ghackmann@...gle.com>,
Michael Davidson <md@...gle.com>
Subject: Re: [PATCH] netfilter: ctnetlink: Make some parameters integer to
avoid enum mismatch
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.
> Since this is intended change the argument type of to be an int
> value.
u32 is not int, it's unsigned int
> Signed-off-by: Matthias Kaehlcke <mka@...omium.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;
>
Powered by blists - more mailing lists