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] [day] [month] [year] [list]
Date:	Wed, 11 Mar 2015 17:34:58 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Ying Xue <ying.xue@...driver.com>, davem@...emloft.net
CC:	jon.maloy@...csson.com, Paul.Gortmaker@...driver.com,
	erik.hugne@...csson.com, fengguang.wu@...el.com,
	netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net,
	kbuild-all@...org
Subject: Re: [PATCH net-next v2] tipc: fix undefined __ipv6_sock_mc_join compile
 error

Hello.

On 3/11/2015 6:34 AM, Ying Xue wrote:

>>> When CONFIG_IPV6 option is disabled, below error will appear while
>>> building TIPC module:

>>> ERROR: "__ipv6_sock_mc_join" [net/tipc/tipc.ko] undefined!
>>> make[1]: *** [__modpost] Error 1
>>> make: *** [net/tipc/tipc.ko] Error 1

>>> This is because we don't check whether or not the CONFIG_IPV6 is
>>> enabled when calling __ipv6_sock_mc_join().

>>> In addition, especially when TIPC=y, TIPC_MEDIA_UDP=y, and IPV6=m, TIPC
>>> module is also unable to be successfully built. Therefore, we add a
>>> dependency condition like (IPV6 || IPV6=n) to avoid the error.

>>> Fixes: d0f91938bede ("tipc: add ip/udp media type")
>>> Reported-by: Wu Fengguang <fengguang.wu@...el.com>
>>> Cc: Kbuild test robot <kbuild-all@...org>
>>> Signed-off-by: Ying Xue <ying.xue@...driver.com>
>>> ---
>>> v2:
>>>    Fix another compile error when TIPC=y, TIPC_MEDIA_UDP=y, and IPV6=m

[...]

>>> diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
>>> index fc2fb11..6763002 100644
>>> --- a/net/tipc/udp_media.c
>>> +++ b/net/tipc/udp_media.c
>>> @@ -247,10 +247,12 @@ static int enable_mcast(struct udp_bearer *ub, struct
>>> udp_media_addr *remote)
>>>            mreqn.imr_multiaddr = remote->ipv4;
>>>            mreqn.imr_ifindex = ub->ifindex;
>>>            err = __ip_mc_join_group(sk, &mreqn);
>>> +#if IS_ENABLED(CONFIG_IPV6)
>>>        } else {

>>     How about:

>>      } else if (IS_ENABLED(CONFIG_IPV6)) {

> Sorry, I try to the suggestion, but it doesn't work.

    You mean that the linking error you reported doesn't go away?

> Thanks,
> Ying

>>>            if (!ipv6_addr_is_multicast(&remote->ipv6))
>>>                return 0;
>>>            err = __ipv6_sock_mc_join(sk, ub->ifindex, &remote->ipv6);
>>> +#endif
>>>        }
>>>        return err;
>>>    }

WBR, Sergei

--
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