Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 set rmx_mtu to L2 interface mtu, instead of 0, ...



details:   https://anonhg.NetBSD.org/src/rev/78601d0fa31a
branches:  trunk
changeset: 507385:78601d0fa31a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Wed Mar 21 07:52:13 2001 +0000

description:
set rmx_mtu to L2 interface mtu, instead of 0, on mtudisc timeout.
ip6_output() change is for safety.  sync with kame

diffstat:

 sys/netinet6/icmp6.c      |  9 ++++-----
 sys/netinet6/ip6_output.c |  9 ++++++---
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 5d84412d92e0 -r 78601d0fa31a sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c      Wed Mar 21 05:52:11 2001 +0000
+++ b/sys/netinet6/icmp6.c      Wed Mar 21 07:52:13 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: icmp6.c,v 1.60 2001/03/08 00:19:03 itojun Exp $        */
-/*     $KAME: icmp6.c,v 1.203 2001/03/08 00:17:54 itojun Exp $ */
+/*     $NetBSD: icmp6.c,v 1.61 2001/03/21 07:52:13 itojun Exp $        */
+/*     $KAME: icmp6.c,v 1.204 2001/03/20 02:44:39 itojun Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2861,9 +2861,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 = 0;
-               }
+               if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0)
+                       rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
        }
 }
 
diff -r 5d84412d92e0 -r 78601d0fa31a sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Wed Mar 21 05:52:11 2001 +0000
+++ b/sys/netinet6/ip6_output.c Wed Mar 21 07:52:13 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ip6_output.c,v 1.31 2001/02/10 04:14:28 itojun Exp $   */
-/*     $KAME: ip6_output.c,v 1.152 2001/02/02 15:36:33 jinmei Exp $    */
+/*     $NetBSD: ip6_output.c,v 1.32 2001/03/21 07:52:14 itojun Exp $   */
+/*     $KAME: ip6_output.c,v 1.171 2001/03/21 07:30:48 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -734,7 +734,7 @@
                u_int32_t ifmtu = nd_ifinfo[ifp->if_index].linkmtu;
 
                mtu = ro_pmtu->ro_rt->rt_rmx.rmx_mtu;
-               if (mtu > ifmtu) {
+               if (mtu > ifmtu || mtu == 0) {
                        /*
                         * The MTU on the route is larger than the MTU on
                         * the interface!  This shouldn't happen, unless the
@@ -742,6 +742,9 @@
                         * interface was brought up.  Change the MTU in the
                         * route to match the interface MTU (as long as the
                         * field isn't locked).
+                        *
+                        * if MTU on the route is 0, we need to fix the MTU.
+                        * this case happens with path MTU discovery timeouts.
                         */
                         mtu = ifmtu;
                         if ((ro_pmtu->ro_rt->rt_rmx.rmx_locks & RTV_MTU) == 0)



Home | Main Index | Thread Index | Old Index