Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 do not try to update rmx_mtu if rmx_mtu == 0 (o...



details:   https://anonhg.NetBSD.org/src/rev/f31b0266aea8
branches:  trunk
changeset: 532066:f31b0266aea8
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri May 31 03:18:54 2002 +0000

description:
do not try to update rmx_mtu if rmx_mtu == 0 (obey ifmtu)

diffstat:

 sys/netinet6/ip6_output.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r e16f77ac2a81 -r f31b0266aea8 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Fri May 31 01:10:53 2002 +0000
+++ b/sys/netinet6/ip6_output.c Fri May 31 03:18:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.45 2002/05/29 07:53:41 itojun Exp $   */
+/*     $NetBSD: ip6_output.c,v 1.46 2002/05/31 03:18:54 itojun Exp $   */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.45 2002/05/29 07:53:41 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.46 2002/05/31 03:18:54 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1220,7 +1220,9 @@
                        ifp = ro_pmtu->ro_rt->rt_ifp;
                ifmtu = IN6_LINKMTU(ifp);
                mtu = ro_pmtu->ro_rt->rt_rmx.rmx_mtu;
-               if (mtu > ifmtu || mtu == 0) {
+               if (mtu == 0)
+                       mtu = ifmtu;
+               else if (mtu > ifmtu) {
                        /*
                         * The MTU on the route is larger than the MTU on
                         * the interface!  This shouldn't happen, unless the
@@ -1233,10 +1235,8 @@
                         * this case happens with path MTU discovery timeouts.
                         */
                        mtu = ifmtu;
-                       if (!(ro_pmtu->ro_rt->rt_rmx.rmx_locks & RTV_MTU)) {
-                               /* XXX */
+                       if (!(ro_pmtu->ro_rt->rt_rmx.rmx_locks & RTV_MTU))
                                ro_pmtu->ro_rt->rt_rmx.rmx_mtu = mtu;
-                       }
                }
        } else if (ifp) {
                mtu = IN6_LINKMTU(ifp);



Home | Main Index | Thread Index | Old Index