]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/ip_forward.c
[INET]: Consolidate xxx_frag_intern
[linux-2.6-omap-h63xx.git] / net / ipv4 / ip_forward.c
index 61b30d10067644538bda2207a4637b019c2ebdbb..877da3ed52e2bef524d12cc88f2d23aa33b69502 100644 (file)
@@ -40,7 +40,7 @@
 #include <net/route.h>
 #include <net/xfrm.h>
 
-static inline int ip_forward_finish(struct sk_buff *skb)
+static int ip_forward_finish(struct sk_buff *skb)
 {
        struct ip_options * opt = &(IPCB(skb)->opt);
 
@@ -67,7 +67,7 @@ int ip_forward(struct sk_buff *skb)
        if (skb->pkt_type != PACKET_HOST)
                goto drop;
 
-       skb->ip_summed = CHECKSUM_NONE;
+       skb_forward_csum(skb);
 
        /*
         *      According to the RFC, we must first decrease the TTL field. If
@@ -86,7 +86,7 @@ int ip_forward(struct sk_buff *skb)
                goto sr_failed;
 
        if (unlikely(skb->len > dst_mtu(&rt->u.dst) &&
-                    (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
+                    (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
                IP_INC_STATS(IPSTATS_MIB_FRAGFAILS);
                icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
                          htonl(dst_mtu(&rt->u.dst)));
@@ -105,7 +105,7 @@ int ip_forward(struct sk_buff *skb)
         *      We now generate an ICMP HOST REDIRECT giving the route
         *      we calculated.
         */
-       if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr)
+       if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr && !skb->sp)
                ip_rt_send_redirect(skb);
 
        skb->priority = rt_tos2priority(iph->tos);