diff options
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 084f78c3479b..88c96b10684c 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -233,9 +233,14 @@ static int ipv6_dest_hao(struct sk_buff **skbp, int optoff) | |||
233 | 233 | ||
234 | if (skb_cloned(skb)) { | 234 | if (skb_cloned(skb)) { |
235 | struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC); | 235 | struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC); |
236 | struct inet6_skb_parm *opt2; | ||
237 | |||
236 | if (skb2 == NULL) | 238 | if (skb2 == NULL) |
237 | goto discard; | 239 | goto discard; |
238 | 240 | ||
241 | opt2 = IP6CB(skb2); | ||
242 | memcpy(opt2, opt, sizeof(*opt2)); | ||
243 | |||
239 | kfree_skb(skb); | 244 | kfree_skb(skb); |
240 | 245 | ||
241 | /* update all variable using below by copied skbuff */ | 246 | /* update all variable using below by copied skbuff */ |
@@ -296,6 +301,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp) | |||
296 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { | 301 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { |
297 | skb = *skbp; | 302 | skb = *skbp; |
298 | skb->h.raw += ((skb->h.raw[1]+1)<<3); | 303 | skb->h.raw += ((skb->h.raw[1]+1)<<3); |
304 | opt = IP6CB(skb); | ||
299 | #ifdef CONFIG_IPV6_MIP6 | 305 | #ifdef CONFIG_IPV6_MIP6 |
300 | opt->nhoff = dstbuf; | 306 | opt->nhoff = dstbuf; |
301 | #else | 307 | #else |
@@ -690,6 +696,7 @@ int ipv6_parse_hopopts(struct sk_buff **skbp) | |||
690 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { | 696 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { |
691 | skb = *skbp; | 697 | skb = *skbp; |
692 | skb->h.raw += (skb->h.raw[1]+1)<<3; | 698 | skb->h.raw += (skb->h.raw[1]+1)<<3; |
699 | opt = IP6CB(skb); | ||
693 | opt->nhoff = sizeof(struct ipv6hdr); | 700 | opt->nhoff = sizeof(struct ipv6hdr); |
694 | return 1; | 701 | return 1; |
695 | } | 702 | } |