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]
Date:   Wed, 9 Feb 2022 18:06:20 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        UNGLinuxDriver@...rochip.com, davem@...emloft.net,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net-next] net: lan966x: Fix when CONFIG_IPV6 is not set

On Wed, 9 Feb 2022 14:54:23 +0100 Andrew Lunn wrote:
> On Wed, Feb 09, 2022 at 11:18:23AM +0100, Horatiu Vultur wrote:
> > When CONFIG_IPV6 is not set, then the compilation of the lan966x driver

compilation or linking?

> > fails with the following error:
> > 
> > drivers/net/ethernet/microchip/lan966x/lan966x_main.c:444: undefined
> > reference to `ipv6_mc_check_mld'
> > 
> > The fix consists in adding #ifdef around this code.  
> 
> It might be better to add a stub function for when IPv6 is
> disabled. We try to avoid #if in C code.

If it's linking we can do:

 	if (IS_ENABLED(CONFIG_IPV6) &&
	    skb->protocol == htons(ETH_P_IPV6) &&
 	    ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr) &&
 	    !ipv6_mc_check_mld(skb))
 		return false;

But beware that IPV6 can be a module, you may need a Kconfig dependency.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ