mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
[IPV6]: ROUTE: Set appropriate information before inserting a route.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
95a9a5ba02
commit
a1e783634a
1 changed files with 18 additions and 15 deletions
|
@ -1221,21 +1221,24 @@ void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,
|
||||||
2. It is gatewayed route or NONEXTHOP route. Action: clone it.
|
2. It is gatewayed route or NONEXTHOP route. Action: clone it.
|
||||||
*/
|
*/
|
||||||
if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
|
if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
|
||||||
nrt = rt6_cow(rt, daddr, saddr, NULL);
|
nrt = rt6_alloc_cow(rt, daddr, saddr);
|
||||||
if (!nrt->u.dst.error) {
|
if (!nrt)
|
||||||
nrt->u.dst.metrics[RTAX_MTU-1] = pmtu;
|
goto out;
|
||||||
if (allfrag)
|
|
||||||
nrt->u.dst.metrics[RTAX_FEATURES-1] |= RTAX_FEATURE_ALLFRAG;
|
nrt->u.dst.metrics[RTAX_MTU-1] = pmtu;
|
||||||
/* According to RFC 1981, detecting PMTU increase shouldn't be
|
if (allfrag)
|
||||||
happened within 5 mins, the recommended timer is 10 mins.
|
nrt->u.dst.metrics[RTAX_FEATURES-1] |= RTAX_FEATURE_ALLFRAG;
|
||||||
Here this route expiration time is set to ip6_rt_mtu_expires
|
|
||||||
which is 10 mins. After 10 mins the decreased pmtu is expired
|
/* According to RFC 1981, detecting PMTU increase shouldn't be
|
||||||
and detecting PMTU increase will be automatically happened.
|
* happened within 5 mins, the recommended timer is 10 mins.
|
||||||
*/
|
* Here this route expiration time is set to ip6_rt_mtu_expires
|
||||||
dst_set_expires(&nrt->u.dst, ip6_rt_mtu_expires);
|
* which is 10 mins. After 10 mins the decreased pmtu is expired
|
||||||
nrt->rt6i_flags |= RTF_DYNAMIC|RTF_EXPIRES;
|
* and detecting PMTU increase will be automatically happened.
|
||||||
}
|
*/
|
||||||
dst_release(&nrt->u.dst);
|
dst_set_expires(&nrt->u.dst, ip6_rt_mtu_expires);
|
||||||
|
nrt->rt6i_flags |= RTF_DYNAMIC|RTF_EXPIRES;
|
||||||
|
|
||||||
|
ip6_ins_rt(nrt, NULL, NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
nrt = ip6_rt_copy(rt);
|
nrt = ip6_rt_copy(rt);
|
||||||
if (nrt == NULL)
|
if (nrt == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue