diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 190199851c9a..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 | |||
746 | } | 746 | } |
747 | 747 | ||
748 | n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw); | 748 | n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw); |
749 | if (n) { | 749 | if (!IS_ERR(n)) { |
750 | if (!(n->nud_state & NUD_VALID)) { | 750 | if (!(n->nud_state & NUD_VALID)) { |
751 | neigh_event_send(n, NULL); | 751 | neigh_event_send(n, NULL); |
752 | } else { | 752 | } else { |
@@ -1798,8 +1798,6 @@ local_input: | |||
1798 | no_route: | 1798 | no_route: |
1799 | RT_CACHE_STAT_INC(in_no_route); | 1799 | RT_CACHE_STAT_INC(in_no_route); |
1800 | res.type = RTN_UNREACHABLE; | 1800 | res.type = RTN_UNREACHABLE; |
1801 | if (err == -ESRCH) | ||
1802 | err = -ENETUNREACH; | ||
1803 | goto local_input; | 1801 | goto local_input; |
1804 | 1802 | ||
1805 | /* | 1803 | /* |
@@ -2267,9 +2265,9 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4, | |||
2267 | return rt; | 2265 | return rt; |
2268 | 2266 | ||
2269 | if (flp4->flowi4_proto) | 2267 | if (flp4->flowi4_proto) |
2270 | rt = (struct rtable *) xfrm_lookup(net, &rt->dst, | 2268 | rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst, |
2271 | flowi4_to_flowi(flp4), | 2269 | flowi4_to_flowi(flp4), |
2272 | sk, 0); | 2270 | sk, 0); |
2273 | 2271 | ||
2274 | return rt; | 2272 | return rt; |
2275 | } | 2273 | } |