Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/netinet6 Pull up revisions 1.78 & 1.80 (via patch) ...



details:   https://anonhg.NetBSD.org/src/rev/9f5f7210800e
branches:  netbsd-1-6
changeset: 527735:9f5f7210800e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 05 03:52:52 2002 +0000

description:
Pull up revisions 1.78 & 1.80 (via patch) (requested by itojun in #123 & #124):
- correct rmx_mtu value after PMTUD entry timeout (should be set to 0)
- do not mistakenly lock PMTUD route entry with RTV_MTU.

diffstat:

 sys/netinet6/icmp6.c |  19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diffs (47 lines):

diff -r 48d44a744a25 -r 9f5f7210800e sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c      Wed Jun 05 03:50:25 2002 +0000
+++ b/sys/netinet6/icmp6.c      Wed Jun 05 03:52:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icmp6.c,v 1.75.8.1 2002/05/28 19:24:57 tv Exp $        */
+/*     $NetBSD: icmp6.c,v 1.75.8.2 2002/06/05 03:52:52 lukem Exp $     */
 /*     $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.75.8.1 2002/05/28 19:24:57 tv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.75.8.2 2002/06/05 03:52:52 lukem Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1209,13 +1209,10 @@
        /* 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 < rt->rt_ifp->if_mtu) {
                        icmp6stat.icp6s_pmtuchg++;
                        rt->rt_rmx.rmx_mtu = mtu;
                }
@@ -2925,8 +2922,8 @@
                rtrequest((int) RTM_DELETE, (struct sockaddr *)rt_key(rt),
                    rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);
        } else {
-               if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0)
-                       rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
+               if (!(rt->rt_rmx.rmx_locks & RTV_MTU))
+                       rt->rt_rmx.rmx_mtu = 0;
        }
 }
 



Home | Main Index | Thread Index | Old Index