diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-11-19 22:23:18 -0500 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-11-19 22:23:18 -0500 |
commit | df9890c31a1a447254f39e40c3fd81ad6547945b (patch) | |
tree | bf432d75796112d86d102fe721bdce93e6ad6901 /net/ipv6/exthdrs.c | |
parent | a305989386e402f48b216786a5c8cf440b33bdad (diff) |
[IPV6]: Fix sending extension headers before and including routing header.
Based on suggestion from Masahide Nakamura <nakam@linux-ipv6.org>.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 748577b76d75..be6faf311387 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -673,3 +673,22 @@ out: | |||
673 | return ERR_PTR(err); | 673 | return ERR_PTR(err); |
674 | } | 674 | } |
675 | 675 | ||
676 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | ||
677 | struct ipv6_txoptions *opt) | ||
678 | { | ||
679 | /* | ||
680 | * ignore the dest before srcrt unless srcrt is being included. | ||
681 | * --yoshfuji | ||
682 | */ | ||
683 | if (opt && opt->dst0opt && !opt->srcrt) { | ||
684 | if (opt_space != opt) { | ||
685 | memcpy(opt_space, opt, sizeof(*opt_space)); | ||
686 | opt = opt_space; | ||
687 | } | ||
688 | opt->opt_nflen -= ipv6_optlen(opt->dst0opt); | ||
689 | opt->dst0opt = NULL; | ||
690 | } | ||
691 | |||
692 | return opt; | ||
693 | } | ||
694 | |||