aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-09-24 17:07:53 -0700
committerWilly Tarreau <w@1wt.eu>2017-02-10 11:03:55 +0100
commit4d4c1fc6258af913f0a9a9595f2385e58f9f1d9a (patch)
treef217b4bdb55c449fac1217e6da794be336ed6434
parent5b97e5f348cf50af84ca008f930d0e4259026bbc (diff)
downloadedison-v3.10-4d4c1fc6258af913f0a9a9595f2385e58f9f1d9a.tar.gz
neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
commit 2c1a4311b61072afe2309d4152a7993e92caa41c upstream. 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> Signed-off-by: Willy Tarreau <w@1wt.eu>
-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 93efb898bd0..cbad9b896c7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -714,7 +714,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 {