diff options
author | Colin Cross <ccross@android.com> | 2011-10-09 02:24:36 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-09 02:24:36 +0100 |
commit | 57c5768ee61e1cf05a8e2bb04a8cac93645ffffb (patch) | |
tree | c0461f6b63d552c2535cb9d74df5b358e5d6601f /net | |
parent | 7722b3e0e3753d7acbac5ea7f678fded1b32cc40 (diff) |
net: Fix "Support nuking IPv6 sockets as well as IPv4" for 2.6.39
Change-Id: I247b8dc2e32bb83e731209928600e92892dd042c
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'net')
-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 a162a0d85b7..d1e438fa0e2 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3326,8 +3326,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); } |