On 19/05/2015 21:28, Jason Gunthorpe wrote:
> On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote:
>
>> +#if IS_ENABLED(CONFIG_IPV6)
>> + struct sockaddr_in6 *addr_in6 = (struct sockaddr_in6 *)addr;
>> +#endif
>> + __be32 ret_addr;
>> +
>> + switch (addr->sa_family) {
>> + case AF_INET:
>> + in_dev = in_dev_get(dev);
>> + if (!in_dev)
>> + return false;
>> +
>> + ret_addr = inet_confirm_addr(net, in_dev, 0,
>> + addr_in->sin_addr.s_addr,
>> + RT_SCOPE_HOST);
>> + in_dev_put(in_dev);
>> + if (ret_addr)
>> + return true;
>> +
>> + break;
>> +#if IS_ENABLED(CONFIG_IPV6)
>> + case AF_INET6:
>> + if (ipv6_chk_addr(net, &addr_in6->sin6_addr, dev, 1))
>> + return true;
>> +
>> + break;
>> +#endif
>
> Can you use
>
> if (IS_ENABLED(CONFIG_IPV6))
>
> At the call site instead of the #if guards?
Sure, I'll do that in the next revision of the patch-set.
Haggai
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html