Re: [PATCH v3 net-next 2/5] net/ipv6: Address checks need to consider the L3 domain
flat view
From: David Ahern <hidden>
Date: 2018-03-07 19:53:37
On 3/7/18 10:28 AM, David Ahern wrote:
On 3/7/18 4:53 AM, Kirill Tkhai wrote:quoted
quoted
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.