linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ipv4 / ip_forward.c
index be1e87c..0923add 100644 (file)
@@ -46,7 +46,7 @@ static inline int ip_forward_finish(struct sk_buff *skb)
 {
        struct ip_options * opt = &(IPCB(skb)->opt);
 
-       IP_INC_STATS_BH(OutForwDatagrams);
+       IP_INC_STATS_BH(IPSTATS_MIB_OUTFORWDATAGRAMS);
 
        if (unlikely(opt->optlen))
                ip_forward_options(skb);
@@ -76,16 +76,12 @@ int ip_forward(struct sk_buff *skb)
         *      that reaches zero, we must reply an ICMP control message telling
         *      that the packet's lifetime expired.
         */
-
-       iph = skb->nh.iph;
-
-       if (iph->ttl <= 1)
+       if (skb->nh.iph->ttl <= 1)
                 goto too_many_hops;
 
        if (!xfrm4_route_forward(skb))
                goto drop;
 
-       iph = skb->nh.iph;
        rt = (struct rtable*)skb->dst;
 
        if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)