Subject: Re: [PATCH net-next] af_mpls: fix undefined reference to ip6_route_output

From: roopa <[email-masked]>
Date: Wed, 22 Jul 2015 12:30:22 -0700

On 7/22/15, 5:23 AM, Thomas Graf wrote:
> On 07/22/15 at 12:10am, Roopa Prabhu wrote:
>> From: Roopa Prabhu <[email-masked]>
>>
>> seen with CONFIG_IPV6 disabled. Wrap the code
>> around IS_ENABLED(CONFIG_IPV6)
>>
>> Reported-by: kbuild test robot <[email-masked]>
>> Signed-off-by: Roopa Prabhu <[email-masked]>
> We need the same for CONFIG_INET=n in inet_fib_lookup_dev:
>
> /home/tgraf/dev/linux/net-next/include/net/route.h:122: undefined reference to `ip_route_output_flow'
  I will fix it.
>
> Is it worth returning EAFNOSUPPORT instead of ENODEV in these
> cases?  Something like this:

sure, I am ok with changing it to return EAFNOSUPPORT.
I decided on -ENODEV because I was already sending -ENODEV
for cases where the dev cannot be resolved.

>
>>   }
>> +#else
>> +static struct net_device *inet6_fib_lookup_dev(struct net *net, void *addr)
>> +{
>   +	return ERR_PTR(-EAFNOSUPPORT);
>> +}
>> +#endif
> And then IS_ERR() in mpls_route_add()?