summaryrefslogtreecommitdiffstats
path: root/net/tipc/udp_media.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2015-03-19 16:47:58 -0300
committerDavid S. Miller <davem@davemloft.net>2015-03-19 16:06:27 -0400
commit446981e5fcad3d64a27358d6591928da4a55a156 (patch)
tree48594d4536820e272c63f27d59d506a1d2f8eeff /net/tipc/udp_media.c
parentd15b1de46ffa7551c36d7be5a58a02321a820a0f (diff)
downloadlinux-446981e5fcad3d64a27358d6591928da4a55a156.tar.bz2
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: d0f91938bede ("tipc: add ip/udp media type") Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/udp_media.c')
-rw-r--r--net/tipc/udp_media.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 04836dd70c2b..ac89101e5d1b 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -44,6 +44,7 @@
#include <net/sock.h>
#include <net/ip.h>
#include <net/udp_tunnel.h>
+#include <net/addrconf.h>
#include <linux/tipc_netlink.h>
#include "core.h"
#include "bearer.h"
@@ -247,10 +248,13 @@ 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 {
if (!ipv6_addr_is_multicast(&remote->ipv6))
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;
}