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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index b0d83e8e4252..12c5a4dec09e 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -354,10 +354,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
354 if (!pskb_may_pull(skb, ah_hlen)) 354 if (!pskb_may_pull(skb, ah_hlen))
355 goto out; 355 goto out;
356 356
357 tmp_hdr = kmalloc(hdr_len, GFP_ATOMIC); 357 tmp_hdr = kmemdup(skb->nh.raw, hdr_len, GFP_ATOMIC);
358 if (!tmp_hdr) 358 if (!tmp_hdr)
359 goto out; 359 goto out;
360 memcpy(tmp_hdr, skb->nh.raw, hdr_len);
361 if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len, XFRM_POLICY_IN)) 360 if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len, XFRM_POLICY_IN))
362 goto free_out; 361 goto free_out;
363 skb->nh.ipv6h->priority = 0; 362 skb->nh.ipv6h->priority = 0;
@@ -397,7 +396,7 @@ out:
397} 396}
398 397
399static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, 398static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
400 int type, int code, int offset, __u32 info) 399 int type, int code, int offset, __be32 info)
401{ 400{
402 struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; 401 struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
403 struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset); 402 struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset);