aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r--net/ipv6/ah6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index ae68a900f605..ff904a711f3a 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -235,11 +235,11 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
235 char hdrs[0]; 235 char hdrs[0];
236 } *tmp_ext; 236 } *tmp_ext;
237 237
238 top_iph = (struct ipv6hdr *)skb->data; 238 top_iph = ipv6_hdr(skb);
239 top_iph->payload_len = htons(skb->len - sizeof(*top_iph)); 239 top_iph->payload_len = htons(skb->len - sizeof(*top_iph));
240 240
241 nexthdr = *skb_network_header(skb); 241 nexthdr = *skb_mac_header(skb);
242 *skb_network_header(skb) = IPPROTO_AH; 242 *skb_mac_header(skb) = IPPROTO_AH;
243 243
244 /* When there are no extension headers, we only need to save the first 244 /* When there are no extension headers, we only need to save the first
245 * 8 bytes of the base IP header. 245 * 8 bytes of the base IP header.