From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938767AbdDSTl1 (ORCPT ); Wed, 19 Apr 2017 15:41:27 -0400 Received: from smtprelay0099.hostedemail.com ([216.40.44.99]:37182 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1764723AbdDSTlX (ORCPT ); Wed, 19 Apr 2017 15:41:23 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4605:5007:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12296:12438:12555:12740:12760:12895:13069:13255:13311:13357:13439:14181:14659:14721:21080:21212:21451:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: boats55_7ed6a081a6834 X-Filterd-Recvd-Size: 2624 Message-ID: <1492630870.30293.3.camel@perches.com> Subject: Re: [PATCH] netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch From: Joe Perches To: Matthias Kaehlcke , Pablo Neira Ayuso , Jozsef Kadlecsik , "David S . Miller" Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler , Greg Hackmann , Michael Davidson Date: Wed, 19 Apr 2017 12:41:10 -0700 In-Reply-To: <20170419183920.21936-1-mka@chromium.org> References: <20170419183920.21936-1-mka@chromium.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; >