Source-Changes-HG archive

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

[src/trunk]: src/sys/net Do not if_down() when a down event of the lower laye...



details:   https://anonhg.NetBSD.org/src/rev/e86c860ce8ff
branches:  trunk
changeset: 983661:e86c860ce8ff
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Tue Jun 01 04:19:57 2021 +0000

description:
Do not if_down() when a down event of the lower layer of LCP is happened
since the layer try to reconnect.

diffstat:

 sys/net/if_spppsubr.c |  29 ++++++++---------------------
 1 files changed, 8 insertions(+), 21 deletions(-)

diffs (54 lines):

diff -r d281914b678e -r e86c860ce8ff sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Tue Jun 01 03:51:33 2021 +0000
+++ b/sys/net/if_spppsubr.c     Tue Jun 01 04:19:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.248 2021/06/01 03:51:33 yamaguchi Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.249 2021/06/01 04:19:57 yamaguchi Exp $       */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.248 2021/06/01 03:51:33 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.249 2021/06/01 04:19:57 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -2746,29 +2746,16 @@
                sp->lcp.tlf_sent = false;
        }
 
-       /*
-        * If this is neither a dial-on-demand nor a passive
-        * interface, simulate an ``ifconfig down'' action, so the
-        * administrator can force a redial by another ``ifconfig
-        * up''.  XXX For leased line operation, should we immediately
-        * try to reopen the connection here?
-        */
+       if (debug) {
+               log(LOG_DEBUG,
+                   "%s: Down event (carrier loss)\n",
+                   ifp->if_xname);
+       }
+
        if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) == 0) {
-               if (debug)
-                       log(LOG_INFO,
-                           "%s: Down event (carrier loss), taking interface down.\n",
-                           ifp->if_xname);
-               SPPP_UNLOCK(sp);
-               if_down(ifp);
-               SPPP_LOCK(sp, RW_WRITER);
-
                if (sp->lcp.reestablish)
                        sppp_wq_add(sp->wq_cp, &sp->scp[IDX_LCP].work_open);
        } else {
-               if (debug)
-                       log(LOG_DEBUG,
-                           "%s: Down event (carrier loss)\n",
-                           ifp->if_xname);
 
                sp->pp_flags &= ~PP_CALLIN;
                if (sp->scp[pidx].state != STATE_INITIAL)



Home | Main Index | Thread Index | Old Index