diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 173e7ea54c7016d43e81a269571049ca4b55199d..cbadb942c3328d3585add8e791fcd2e3d2cb1d67 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 {