diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 258e3e45f5e0..c14ea1ecf379 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -475,17 +475,25 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) | |||
475 | switch (**nexthdr) { | 475 | switch (**nexthdr) { |
476 | 476 | ||
477 | case NEXTHDR_HOP: | 477 | case NEXTHDR_HOP: |
478 | break; | ||
478 | case NEXTHDR_ROUTING: | 479 | case NEXTHDR_ROUTING: |
480 | found_rhdr = 1; | ||
481 | break; | ||
479 | case NEXTHDR_DEST: | 482 | case NEXTHDR_DEST: |
480 | if (**nexthdr == NEXTHDR_ROUTING) found_rhdr = 1; | 483 | #ifdef CONFIG_IPV6_MIP6 |
481 | if (**nexthdr == NEXTHDR_DEST && found_rhdr) return offset; | 484 | if (ipv6_find_tlv(skb, offset, IPV6_TLV_HAO) >= 0) |
482 | offset += ipv6_optlen(exthdr); | 485 | break; |
483 | *nexthdr = &exthdr->nexthdr; | 486 | #endif |
484 | exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset); | 487 | if (found_rhdr) |
488 | return offset; | ||
485 | break; | 489 | break; |
486 | default : | 490 | default : |
487 | return offset; | 491 | return offset; |
488 | } | 492 | } |
493 | |||
494 | offset += ipv6_optlen(exthdr); | ||
495 | *nexthdr = &exthdr->nexthdr; | ||
496 | exthdr = (struct ipv6_opt_hdr*)(skb->nh.raw + offset); | ||
489 | } | 497 | } |
490 | 498 | ||
491 | return offset; | 499 | return offset; |