aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorMasahide NAKAMURA <nakam@linux-ipv6.org>2006-08-23 22:29:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:06:56 -0400
commit27637df92e25dfb45dd71a93a2f4bf9c080fa627 (patch)
treee4c477a1faff6faf7ae2812a921c06c4116f3731 /net/ipv6/ip6_output.c
parent793832361fe7e9c3fcae2edd1d293c583a0a095c (diff)
[IPV6] IPSEC: Support sending with Mobile IPv6 extension headers.
Mobile IPv6 defines home address option as an option of destination options header. It is placed before fragment header then ip6_find_1stfragopt() is fixed to know about it. Home address option also carries final source address of the flow, then outbound AH calculation should take care of it like routing header case. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c18
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;