diff options
| author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-09-24 17:07:53 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:58:46 +0200 |
| commit | 4afaeff7fa79ebf551bf2fe745f37eaccd57c3a9 (patch) | |
| tree | f012d8f09170fd478b5bbe972ba6631599bb8daf /net/ipv4 | |
| parent | 03c35e51554d23fa978d7434756212240e443471 (diff) | |
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>
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index ca69df915..a1393ba4e 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -716,7 +716,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 { |
