[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <afb0e946-b58f-5d63-de53-c7f5f47d774b@gmail.com>
Date: Wed, 7 Mar 2018 12:53:54 -0700
From: David Ahern <dsahern@...il.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>, netdev@...r.kernel.org
Cc: idosch@...sch.org
Subject: Re: [PATCH v3 net-next 2/5] net/ipv6: Address checks need to consider
the L3 domain
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.
Powered by blists - more mailing lists