Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix not to put the wrong error message



details:   https://anonhg.NetBSD.org/src/rev/a569e2ddc234
branches:  trunk
changeset: 961330:a569e2ddc234
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Fri Apr 16 02:05:37 2021 +0000

description:
Fix not to put the wrong error message

diffstat:

 sys/net/if_spppsubr.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r ea32efe10fed -r a569e2ddc234 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Fri Apr 16 01:59:50 2021 +0000
+++ b/sys/net/if_spppsubr.c     Fri Apr 16 02:05:37 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.215 2020/11/27 03:37:11 yamaguchi Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.216 2021/04/16 02:05:37 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.215 2020/11/27 03:37:11 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.216 2021/04/16 02:05:37 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1933,6 +1933,13 @@
                sppp_cp_change_state(cp, sp, STATE_STARTING);
                break;
        default:
+               /*
+                * a down event may be caused regardless
+                * of state just in LCP case.
+                */
+               if (cp->proto == PPP_LCP)
+                       break;
+
                printf("%s: %s illegal down in state %s\n",
                       ifp->if_xname, cp->name,
                       sppp_state_name(sp->scp[cp->protoidx].state));



Home | Main Index | Thread Index | Old Index