]> err.no Git - linux-2.6/blobdiff - net/ipv4/ah4.c
Pull cpuidle into release branch
[linux-2.6] / net / ipv4 / ah4.c
index d69706405d58a52c7c8a19dc3b35784535fa9fda..5fc346d8b5665a344f80a8b82e6c2013b9dd549f 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/spinlock.h>
 #include <net/icmp.h>
 #include <net/protocol.h>
-#include <asm/scatterlist.h>
 
 
 /* Clear mutable options and find final destination to substitute
@@ -115,8 +114,6 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
                memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr));
        }
 
-       ip_send_check(top_iph);
-
        err = 0;
 
 error:
@@ -127,6 +124,7 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
 {
        int ah_hlen;
        int ihl;
+       int nexthdr;
        int err = -EINVAL;
        struct iphdr *iph;
        struct ip_auth_hdr *ah;
@@ -138,6 +136,7 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
 
        ah = (struct ip_auth_hdr *)skb->data;
        ahp = x->data;
+       nexthdr = ah->nexthdr;
        ah_hlen = (ah->hdrlen + 2) << 2;
 
        if (ah_hlen != XFRM_ALIGN8(sizeof(*ah) + ahp->icv_full_len) &&
@@ -184,13 +183,12 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
                        goto out;
                }
        }
-       ((struct iphdr*)work_buf)->protocol = ah->nexthdr;
        skb->network_header += ah_hlen;
        memcpy(skb_network_header(skb), work_buf, ihl);
        skb->transport_header = skb->network_header;
        __skb_pull(skb, ah_hlen + ihl);
 
-       return 0;
+       return nexthdr;
 
 out:
        return err;