[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>
This commit is contained in:
@@ -673,3 +673,22 @@ out:
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
|
||||
struct ipv6_txoptions *opt)
|
||||
{
|
||||
/*
|
||||
* ignore the dest before srcrt unless srcrt is being included.
|
||||
* --yoshfuji
|
||||
*/
|
||||
if (opt && opt->dst0opt && !opt->srcrt) {
|
||||
if (opt_space != opt) {
|
||||
memcpy(opt_space, opt, sizeof(*opt_space));
|
||||
opt = opt_space;
|
||||
}
|
||||
opt->opt_nflen -= ipv6_optlen(opt->dst0opt);
|
||||
opt->dst0opt = NULL;
|
||||
}
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user