diff options
author | Colin Cross <ccross@android.com> | 2011-06-22 14:27:37 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-22 14:42:06 -0700 |
commit | 99e01b39d98cd93ca749cca79272d7eb40cc07b0 (patch) | |
tree | 0ae808aece3b15bd8627ba4de09ed02505a74a65 /net/ipv4/tcp.c | |
parent | af21159d1d2e0c31655df0aacded2e86444b025d (diff) | |
download | kernel_samsung_crespo-99e01b39d98cd93ca749cca79272d7eb40cc07b0.zip kernel_samsung_crespo-99e01b39d98cd93ca749cca79272d7eb40cc07b0.tar.gz kernel_samsung_crespo-99e01b39d98cd93ca749cca79272d7eb40cc07b0.tar.bz2 |
net: ipv4: tcp: Fix crash in tcp_nuke_addr
ip_route_output_key can return an ERR_PTR, don't dereference it.
Change-Id: I6b86a451b2bdb33873d79b3cf90c11dbe72bc081
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index d99fd5c..0387db5 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3334,7 +3334,7 @@ static int tcp_is_local(struct net *net, __be32 addr) { struct rtable *rt; struct flowi4 fl4 = { .daddr = addr }; rt = ip_route_output_key(net, &fl4); - if (!rt) + if (IS_ERR_OR_NULL(rt)) return 0; return rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK); } |