Skip to content

Commit

Permalink
tipc: fix compile error when IPV6=m and TIPC=y
Browse files Browse the repository at this point in the history
When IPV6=m and TIPC=y, below error will appear during building kernel
image:

net/tipc/udp_media.c:196:
undefined reference to `ip6_dst_lookup'
make: *** [vmlinux] Error 1

As ip6_dst_lookup() is implemented in IPV6 and IPV6 is compiled as
module, ip6_dst_lookup() is not built-in core kernel image. As a
result, compiler cannot find 'ip6_dst_lookup' reference while
compiling TIPC code into core kernel image.

But with the method introduced by commit 5f81bd2 ("ipv6: export a
stub for IPv6 symbols used by vxlan"), we can avoid the compile error
through "ipv6_stub" pointer to access ip6_dst_lookup().

Fixes: d0f9193 ("tipc: add ip/udp media type")
Suggested-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ying-xue authored and davem330 committed Mar 24, 2015
1 parent 66400d5 commit ed3e852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tipc/udp_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
.saddr = src->ipv6,
.flowi6_proto = IPPROTO_UDP
};
err = ip6_dst_lookup(ub->ubsock->sk, &ndst, &fl6);
err = ipv6_stub->ipv6_dst_lookup(ub->ubsock->sk, &ndst, &fl6);
if (err)
goto tx_error;
ttl = ip6_dst_hoplimit(ndst);
Expand Down

0 comments on commit ed3e852

Please sign in to comment.