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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 1c914386982f..b682d2368c2a 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -325,6 +325,7 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
325 */ 325 */
326 326
327 struct ipv6_auth_hdr *ah; 327 struct ipv6_auth_hdr *ah;
328 struct ipv6hdr *ip6h;
328 struct ah_data *ahp; 329 struct ah_data *ahp;
329 unsigned char *tmp_hdr = NULL; 330 unsigned char *tmp_hdr = NULL;
330 u16 hdr_len; 331 u16 hdr_len;
@@ -357,13 +358,14 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
357 tmp_hdr = kmemdup(skb_network_header(skb), hdr_len, GFP_ATOMIC); 358 tmp_hdr = kmemdup(skb_network_header(skb), hdr_len, GFP_ATOMIC);
358 if (!tmp_hdr) 359 if (!tmp_hdr)
359 goto out; 360 goto out;
360 if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len, XFRM_POLICY_IN)) 361 ip6h = ipv6_hdr(skb);
362 if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN))
361 goto free_out; 363 goto free_out;
362 skb->nh.ipv6h->priority = 0; 364 ip6h->priority = 0;
363 skb->nh.ipv6h->flow_lbl[0] = 0; 365 ip6h->flow_lbl[0] = 0;
364 skb->nh.ipv6h->flow_lbl[1] = 0; 366 ip6h->flow_lbl[1] = 0;
365 skb->nh.ipv6h->flow_lbl[2] = 0; 367 ip6h->flow_lbl[2] = 0;
366 skb->nh.ipv6h->hop_limit = 0; 368 ip6h->hop_limit = 0;
367 369
368 { 370 {
369 u8 auth_data[MAX_AH_AUTH_LEN]; 371 u8 auth_data[MAX_AH_AUTH_LEN];