diff options
-rw-r--r-- | net/ipv4/ip_input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 48e4ddc1e337..7e78095baef1 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -333,16 +333,16 @@ drop: | |||
333 | 333 | ||
334 | static inline int ip_rcv_finish(struct sk_buff *skb) | 334 | static inline int ip_rcv_finish(struct sk_buff *skb) |
335 | { | 335 | { |
336 | struct net_device *dev = skb->dev; | ||
337 | struct iphdr *iph = skb->nh.iph; | 336 | struct iphdr *iph = skb->nh.iph; |
338 | int err; | ||
339 | 337 | ||
340 | /* | 338 | /* |
341 | * Initialise the virtual path cache for the packet. It describes | 339 | * Initialise the virtual path cache for the packet. It describes |
342 | * how the packet travels inside Linux networking. | 340 | * how the packet travels inside Linux networking. |
343 | */ | 341 | */ |
344 | if (skb->dst == NULL) { | 342 | if (likely(skb->dst == NULL)) { |
345 | if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) { | 343 | int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, |
344 | skb->dev); | ||
345 | if (unlikely(err)) { | ||
346 | if (err == -EHOSTUNREACH) | 346 | if (err == -EHOSTUNREACH) |
347 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); | 347 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); |
348 | goto drop; | 348 | goto drop; |
@@ -350,7 +350,7 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | #ifdef CONFIG_NET_CLS_ROUTE | 352 | #ifdef CONFIG_NET_CLS_ROUTE |
353 | if (skb->dst->tclassid) { | 353 | if (unlikely(skb->dst->tclassid)) { |
354 | struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id(); | 354 | struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id(); |
355 | u32 idx = skb->dst->tclassid; | 355 | u32 idx = skb->dst->tclassid; |
356 | st[idx&0xFF].o_packets++; | 356 | st[idx&0xFF].o_packets++; |