Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 528346332e739e0d36599d42638f8f8f848de378 Author: Sven Eckelmann sven@narfation.org Date: Wed Mar 1 08:25:42 2017 +0100
batman-adv: Re-add preprocessor check in batadv_mcast_mla_br_addr_cpy
The union member ip6 in br_ip::u is not available when the kernel is build without IPv6 support. The code accessing this member must therefore be protected by a preprocessor check which tests for CONFIG_IPV6.
Reported-by: kbuild test robot fengguang.wu@intel.com Fixes: b4008f675b37 ("batman-adv: Remove preprocessor checks in multicast.c") Signed-off-by: Sven Eckelmann sven@narfation.org
528346332e739e0d36599d42638f8f8f848de378 net/batman-adv/multicast.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index 0e9112c..d327670 100644 --- a/net/batman-adv/multicast.c +++ b/net/batman-adv/multicast.c @@ -182,8 +182,10 @@ static void batadv_mcast_mla_br_addr_cpy(char *dst, const struct br_ip *src) { if (src->proto == htons(ETH_P_IP)) ip_eth_mc_map(src->u.ip4, dst); - else if (IS_ENABLED(CONFIG_IPV6) && src->proto == htons(ETH_P_IPV6)) +#if IS_ENABLED(CONFIG_IPV6) + else if (src->proto == htons(ETH_P_IPV6)) ipv6_eth_mc_map(&src->u.ip6, dst); +#endif else eth_zero_addr(dst); }