diff options
author | Masahide NAKAMURA <nakam@linux-ipv6.org> | 2006-08-31 18:18:49 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:46 -0400 |
commit | dc435e6dac1439340eaeceef84022c4e4749796d (patch) | |
tree | 87da22f876202e108d7e908281bc1b21038836bb | |
parent | a9917c06652165fe4eeb9ab7a5d1e0674e90e508 (diff) |
[IPV6] MIP6: Fix to update IP6CB when cloned skbuff is received at HAO.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-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 | } |