[IPSEC]: Use IPv6 calling convention as the convention for x->mode->output
[deliverable/linux.git] / net / ipv4 / ah4.c
index dbb1f11721e4a90b45bcb56c8cfd9bb6a359cb85..e4f7aa39978de865bb3c03ed12370496fa782b95 100644 (file)
@@ -82,14 +82,14 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
                        goto error;
        }
 
-       ah = (struct ip_auth_hdr *)((char *)top_iph+top_iph->ihl*4);
-       ah->nexthdr = top_iph->protocol;
+       ah = (struct ip_auth_hdr *)skb_transport_header(skb);
+       ah->nexthdr = *skb_mac_header(skb);
+       *skb_mac_header(skb) = IPPROTO_AH;
 
        top_iph->tos = 0;
        top_iph->tot_len = htons(skb->len);
        top_iph->frag_off = 0;
        top_iph->ttl = 0;
-       top_iph->protocol = IPPROTO_AH;
        top_iph->check = 0;
 
        ahp = x->data;
This page took 0.053771 seconds and 5 git commands to generate.