aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2014-03-26 15:27:05 +0530
committerAndrey Konovalov <andrey.konovalov@linaro.org>2015-12-08 13:54:06 +0300
commit6fa899e8f7b7cde3ca1be1d7c007802c18b029d8 (patch)
tree7a5a6932e13f9b7f134d923fabfcc232dbe7f8cb
parenta5233e1b4055da6088f55c36f78b9b1e9b740c18 (diff)
tcp: Fix build error if IPV6 is not selected
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. 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>
-rw-r--r--net/ipv4/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 7c6ca994aa6f..8d7d383ea93a 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)