aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-09-24 17:07:53 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-28 17:16:04 -0400
commit2c1a4311b61072afe2309d4152a7993e92caa41c (patch)
tree7addd5b21588c2403e2ff3e563fbe2ce0a75bc9b /net
parentMerge branch 'ipv6_tunnel' (diff)
downloadlinux-dev-2c1a4311b61072afe2309d4152a7993e92caa41c.tar.xz
linux-dev-2c1a4311b61072afe2309d4152a7993e92caa41c.zip
neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
Fixes: commit f187bc6efb7250afee0e2009b6106 ("ipv4: No need to set generic neighbour pointer") Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 173e7ea54c70..cbadb942c332 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -746,7 +746,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
}
n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw);
- if (n) {
+ if (!IS_ERR(n)) {
if (!(n->nud_state & NUD_VALID)) {
neigh_event_send(n, NULL);
} else {