diff options
author | ume <ume@FreeBSD.org> | 2003-10-31 16:32:12 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-10-31 16:32:12 +0000 |
commit | 2ecf5196e30610169d33ac5c6873f6ab5c8f7743 (patch) | |
tree | 958f1c21a7724202b619c2847336942e4d328f3f /sys | |
parent | f315d51acc98e74f4f0d29b6490b6a53fbf24472 (diff) | |
download | FreeBSD-src-2ecf5196e30610169d33ac5c6873f6ab5c8f7743.zip FreeBSD-src-2ecf5196e30610169d33ac5c6873f6ab5c8f7743.tar.gz |
do not insert a dest option header (even specified by a user) that
should be placed before a routing header, unless a routing header
really exists.
Obtained from: KAME
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/ip6_output.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index d916434..bbb7a43 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -214,7 +214,19 @@ ip6_output(m0, opt, ro, flags, im6o, ifpp, inp) /* Hop-by-Hop options header */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); /* Destination options header(1st part) */ - MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + if (opt->ip6po_rthdr) { + /* + * Destination options header(1st part) + * This only makes sence with a routing header. + * See Section 9.2 of RFC 3542. + * Disabling this part just for MIP6 convenience is + * a bad idea. We need to think carefully about a + * way to make the advanced API coexist with MIP6 + * options, which might automatically be inserted in + * the kernel. + */ + MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + } /* Routing header */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); /* Destination options header(2nd part) */ |