diff options
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index af2ec88bbb2f..c703528e0bcd 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -283,14 +283,18 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
283 | { | 283 | { |
284 | struct net_device *dev = skb->dev; | 284 | struct net_device *dev = skb->dev; |
285 | struct iphdr *iph = skb->nh.iph; | 285 | struct iphdr *iph = skb->nh.iph; |
286 | int err; | ||
286 | 287 | ||
287 | /* | 288 | /* |
288 | * Initialise the virtual path cache for the packet. It describes | 289 | * Initialise the virtual path cache for the packet. It describes |
289 | * how the packet travels inside Linux networking. | 290 | * how the packet travels inside Linux networking. |
290 | */ | 291 | */ |
291 | if (skb->dst == NULL) { | 292 | if (skb->dst == NULL) { |
292 | if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev)) | 293 | if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) { |
294 | if (err == -EHOSTUNREACH) | ||
295 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); | ||
293 | goto drop; | 296 | goto drop; |
297 | } | ||
294 | } | 298 | } |
295 | 299 | ||
296 | #ifdef CONFIG_NET_CLS_ROUTE | 300 | #ifdef CONFIG_NET_CLS_ROUTE |