diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2014-03-26 15:27:05 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2016-01-11 09:50:34 +0530 |
commit | 7aa3b83f8fdeb1621b989f0084f2218aca74c1aa (patch) | |
tree | 73cb971f5ebcfede53e7354f055e12c733f57ef0 | |
parent | ca259b2b0e9003f91a89682b66ee48be0319d6df (diff) | |
download | linaro-android-7aa3b83f8fdeb1621b989f0084f2218aca74c1aa.tar.gz |
tcp: Fix IPV6 module build errors
If CONFIG_IPV6=m is selected, we are getting following build errors.
net/built-in.o: In function `tcp_is_local6':
net/ipv4/tcp.c:3261: undefined reference to `rt6_lookup'
Making the code conditional upon only CONFIG_IPV6=y fixes this issue.
Also export tcp_nuke_addr to build IPv6 modules. Otherwise
we run into following build error:
CC [M] lib/zlib_deflate/deftree.o
CC [M] lib/zlib_deflate/deflate_syms.o
LD [M] lib/zlib_deflate/zlib_deflate.o
Building modules, stage 2.
MODPOST 46 modules
ERROR: "tcp_nuke_addr" [net/ipv6/ipv6.ko] undefined!
make[2]: *** [__modpost] Error 1
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r-- | net/ipv4/tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 65dc38a429ae..e8c126a52551 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3214,7 +3214,7 @@ static int tcp_is_local(struct net *net, __be32 addr) { return rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK); } -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#if defined(CONFIG_IPV6) static int tcp_is_local6(struct net *net, struct in6_addr *addr) { struct rt6_info *rt6 = rt6_lookup(net, addr, addr, 0, 0); return rt6 && rt6->dst.dev && (rt6->dst.dev->flags & IFF_LOOPBACK); @@ -3282,7 +3282,7 @@ restart: continue; } -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#if defined(CONFIG_IPV6) if (family == AF_INET6) { struct in6_addr *s6; if (!inet->pinet6) @@ -3319,3 +3319,4 @@ restart: return 0; } +EXPORT_SYMBOL_GPL(tcp_nuke_addr); |