aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 58da8e1e2ae..d99fd5c9190 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3332,8 +3332,9 @@ void __init tcp_init(void)
static int tcp_is_local(struct net *net, __be32 addr) {
struct rtable *rt;
- struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } };
- if (ip_route_output_key(net, &rt, &fl) || !rt)
+ struct flowi4 fl4 = { .daddr = addr };
+ rt = ip_route_output_key(net, &fl4);
+ if (!rt)
return 0;
return rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK);
}