]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/ah4.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / net / ipv4 / ah4.c
index 880a5ec6dce0e35805aa5abfb4a4cc4809698579..86961bec70abbdda253b68da69ba6780ece39726 100644 (file)
@@ -314,14 +314,15 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
 
        skb->ip_summed = CHECKSUM_NONE;
 
-       ah = (struct ip_auth_hdr *)skb->data;
-       iph = ip_hdr(skb);
-       ihl = ip_hdrlen(skb);
 
        if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
                goto out;
        nfrags = err;
 
+       ah = (struct ip_auth_hdr *)skb->data;
+       iph = ip_hdr(skb);
+       ihl = ip_hdrlen(skb);
+
        work_iph = ah_alloc_tmp(ahash, nfrags, ihl + ahp->icv_trunc_len);
        if (!work_iph)
                goto out;