diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-05-31 04:27:01 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-05-31 04:27:01 +0000 |
commit | 010e92f60a15b6f37bcc35777a9cb2bee4f4e81c (patch) | |
tree | ac28229a383e039f0f61401f4f3a01108cbc598d | |
parent | 4d9f64d475d359c3160fe51d12b3d6590f9a5371 (diff) |
do not mistakenly lock PMTUD route entry with RTV_MTU.
-rw-r--r-- | sys/netinet6/icmp6.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index b61ef1ea4f5..39e40fdf37d 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.58 2002/05/29 23:38:58 itojun Exp $ */ +/* $OpenBSD: icmp6.c,v 1.59 2002/05/31 04:27:00 itojun Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1206,13 +1206,10 @@ icmp6_mtudisc_update(ip6cp, validated) /* sin6.sin6_scope_id = XXX: should be set if DST is a scoped addr */ rt = icmp6_mtudisc_clone((struct sockaddr *)&sin6); - if (rt && (rt->rt_flags & RTF_HOST) - && !(rt->rt_rmx.rmx_locks & RTV_MTU)) { - if (mtu < IPV6_MMTU) { - /* xxx */ - rt->rt_rmx.rmx_locks |= RTV_MTU; - } else if (mtu < rt->rt_ifp->if_mtu && - rt->rt_rmx.rmx_mtu > mtu) { + if (rt && (rt->rt_flags & RTF_HOST) && + !(rt->rt_rmx.rmx_locks & RTV_MTU) && + (rt->rt_rmx.rmx_mtu > mtu || rt->rt_rmx.rmx_mtu == 0)) { + if (mtu < IN6_LINKMTU(rt->rt_ifp)) { icmp6stat.icp6s_pmtuchg++; rt->rt_rmx.rmx_mtu = mtu; } |