diff options
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r-- | net/ipv6/ah6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 2d9e495cf691..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; |