From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:46696 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934619AbeCGTxh (ORCPT ); Wed, 7 Mar 2018 14:53:37 -0500 Received: by mail-pg0-f66.google.com with SMTP id r26so1281402pgv.13 for ; Wed, 07 Mar 2018 11:53:37 -0800 (PST) Subject: Re: [PATCH v3 net-next 2/5] net/ipv6: Address checks need to consider the L3 domain From: David Ahern To: Kirill Tkhai , netdev@vger.kernel.org Cc: idosch@idosch.org References: <20180307035841.774-1-dsahern@gmail.com> <20180307035841.774-3-dsahern@gmail.com> Message-ID: Date: Wed, 7 Mar 2018 12:53:54 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/7/18 10:28 AM, David Ahern wrote: > On 3/7/18 4:53 AM, Kirill Tkhai wrote: >>> diff --git a/include/net/addrconf.h b/include/net/addrconf.h >>> index c4185a7b0e90..132e5b95167a 100644 >>> --- a/include/net/addrconf.h >>> +++ b/include/net/addrconf.h >>> @@ -69,8 +69,8 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg); >>> int ipv6_chk_addr(struct net *net, const struct in6_addr *addr, >>> const struct net_device *dev, int strict); >>> int ipv6_chk_addr_and_flags(struct net *net, const struct in6_addr *addr, >>> - const struct net_device *dev, int strict, >>> - u32 banned_flags); >>> + const struct net_device *dev, bool skip_dev_check, >>> + int strict, u32 banned_flags); >> >> This function already has 5 arguments, while this patch adds one more. >> Can't we use new flags argument for both of them? >> >> Also, the name of function and input parameters are already so big, that they >> don't fit a single line already, while your patch adds more parameters. >> Can't we make it more slim? Something like ipv6_chk_addr_fl() instead of current >> name. > > I think I can combine strict and the new skip_dev_check. I am going to > leave the function name as is. > Upon further review, I can not combine those flags; I missed a level of () around the scope check which is what strict modifies. They need to be separate arguments.