Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62804d6a authored by Tushar Behera's avatar Tushar Behera Committed by Amit Pundir
Browse files

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: default avatarTushar Behera <tushar.behera@linaro.org>
CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent 0fdc146d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3150,7 +3150,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);
@@ -3207,7 +3207,7 @@ restart:
					continue;
			}

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#if defined(CONFIG_IPV6)
			if (family == AF_INET6) {
				struct in6_addr *s6;