]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/xfrm4_output.c
[ARM] 4363/1: AT91: Remove legacy PIO definitions
[linux-2.6-omap-h63xx.git] / net / ipv4 / xfrm4_output.c
index 193363e22932ce19f84a60df94d8bfbdaac471d6..038ca160fe2c4c67e3ba17fd39f3361fd31fa795 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * xfrm4_output.c - Common IPsec encapsulation code for IPv4.
  * Copyright (c) 2004 Herbert Xu <herbert@gondor.apana.org.au>
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version
@@ -28,7 +28,7 @@ static int xfrm4_tunnel_check_size(struct sk_buff *skb)
                goto out;
 
        IPCB(skb)->flags |= IPSKB_XFRM_TUNNEL_SIZE;
-       
+
        if (!(iph->frag_off & htons(IP_DF)) || skb->local_df)
                goto out;
 
@@ -47,14 +47,14 @@ static int xfrm4_output_one(struct sk_buff *skb)
        struct dst_entry *dst = skb->dst;
        struct xfrm_state *x = dst->xfrm;
        int err;
-       
-       if (skb->ip_summed == CHECKSUM_HW) {
-               err = skb_checksum_help(skb, 0);
+
+       if (skb->ip_summed == CHECKSUM_PARTIAL) {
+               err = skb_checksum_help(skb);
                if (err)
                        goto error_nolock;
        }
 
-       if (x->props.mode) {
+       if (x->props.mode == XFRM_MODE_TUNNEL) {
                err = xfrm4_tunnel_check_size(skb);
                if (err)
                        goto error_nolock;
@@ -66,7 +66,7 @@ static int xfrm4_output_one(struct sk_buff *skb)
                if (err)
                        goto error;
 
-               err = x->mode->output(skb);
+               err = x->mode->output(x, skb);
                if (err)
                        goto error;
 
@@ -78,14 +78,14 @@ static int xfrm4_output_one(struct sk_buff *skb)
                x->curlft.packets++;
 
                spin_unlock_bh(&x->lock);
-       
+
                if (!(skb->dst = dst_pop(dst))) {
                        err = -EHOSTUNREACH;
                        goto error_nolock;
                }
                dst = skb->dst;
                x = dst->xfrm;
-       } while (x && !x->props.mode);
+       } while (x && (x->props.mode != XFRM_MODE_TUNNEL));
 
        IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED;
        err = 0;
@@ -134,7 +134,7 @@ static int xfrm4_output_finish(struct sk_buff *skb)
        }
 #endif
 
-       if (!skb_shinfo(skb)->gso_size)
+       if (!skb_is_gso(skb))
                return xfrm4_output_finish2(skb);
 
        skb->protocol = htons(ETH_P_IP);