lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55AFEF4B.6070702@cumulusnetworks.com>
Date:	Wed, 22 Jul 2015 12:30:19 -0700
From:	roopa <roopa@...ulusnetworks.com>
To:	David Miller <davem@...emloft.net>
CC:	tgraf@...g.ch, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] af_mpls: fix undefined reference to ip6_route_output

On 7/22/15, 10:49 AM, David Miller wrote:
> From: Thomas Graf <tgraf@...g.ch>
> Date: Wed, 22 Jul 2015 14:23:09 +0200
>
>> On 07/22/15 at 12:10am, Roopa Prabhu wrote:
>>> From: Roopa Prabhu <roopa@...ulusnetworks.com>
>>>
>>> seen with CONFIG_IPV6 disabled. Wrap the code
>>> around IS_ENABLED(CONFIG_IPV6)
>>>
>>> Reported-by: kbuild test robot <fengguang.wu@...el.com>
>>> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
>> 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'
>>
>> Is it worth returning EAFNOSUPPORT instead of ENODEV in these
>> cases?  Something like this:
>>
>>>   }
>>> +#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()?
> Also IS_ENABLED() _DOES NOT_ work, what if MPLS is 'y' and IPV6 is 'm'?
>
> You can't reache the modular symbol from statically built code.
>
> What a mess.
>
Sorry about that, I was looking at other examples where this is done.
For ipvlan, CONFIG_IPVLAN depends on CONFIG_INET and CONFIG_INET6 and I
don't see any additional checks in the driver.
I am wondering if I should submit a patch that does the same for 
MPLS_ROUTING (I am trying to avoid that though).

diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig
index 5c467ef..2b28615 100644
--- a/net/mpls/Kconfig
+++ b/net/mpls/Kconfig
@@ -24,6 +24,8 @@ config NET_MPLS_GSO

  config MPLS_ROUTING
         tristate "MPLS: routing support"
+       depends on INET
+       depends on IPV6
         ---help---
          Add support for forwarding of mpls packets.


Or I will rework the original patch in a different way.
This was introduced by my below commit. Please revert the below commit 
if there is no easy way to make it work
with MPLS_ROUTING = 'y' and IPV6 = 'm'. I will resubmit the patch. Thanks.


commit 01faef2cebae02685e2bcfc9bbee8416d5ec19fc
Author: Roopa Prabhu <roopa@...ulusnetworks.com>
Date:   Tue Jul 21 09:16:24 2015 -0700

     mpls: make RTA_OIF optional

     If user did not specify an oif, try and get it from the via address.
     If failed to get device, return with -ENODEV.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ