提交 446981e5 编写于 作者: M Marcelo Ricardo Leitner 提交者: David S. Miller

tipc: fix build issue when building without IPv6

We can't directly call ipv6_sock_mc_join() but should use the stub
instead and protect it around IS_ENABLED.

Fixes: d0f91938 ("tipc: add ip/udp media type")
Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d15b1de4
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <net/sock.h> #include <net/sock.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/udp_tunnel.h> #include <net/udp_tunnel.h>
#include <net/addrconf.h>
#include <linux/tipc_netlink.h> #include <linux/tipc_netlink.h>
#include "core.h" #include "core.h"
#include "bearer.h" #include "bearer.h"
...@@ -247,10 +248,13 @@ static int enable_mcast(struct udp_bearer *ub, struct udp_media_addr *remote) ...@@ -247,10 +248,13 @@ static int enable_mcast(struct udp_bearer *ub, struct udp_media_addr *remote)
mreqn.imr_multiaddr = remote->ipv4; mreqn.imr_multiaddr = remote->ipv4;
mreqn.imr_ifindex = ub->ifindex; mreqn.imr_ifindex = ub->ifindex;
err = ip_mc_join_group(sk, &mreqn); err = ip_mc_join_group(sk, &mreqn);
#if IS_ENABLED(CONFIG_IPV6)
} else { } else {
if (!ipv6_addr_is_multicast(&remote->ipv6)) if (!ipv6_addr_is_multicast(&remote->ipv6))
return 0; return 0;
err = ipv6_sock_mc_join(sk, ub->ifindex, &remote->ipv6); err = ipv6_stub->ipv6_sock_mc_join(sk, ub->ifindex,
&remote->ipv6);
#endif
} }
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册