mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
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>
This commit is contained in:
parent
86fa9c424c
commit
2c1a4311b6
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user