Source-Changes-HG archive

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

[src/trunk]: src/sys/net Avoid updating of the state if the state is not changed



details:   https://anonhg.NetBSD.org/src/rev/e55200768e37
branches:  trunk
changeset: 961973:e55200768e37
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Mon Apr 26 08:42:19 2021 +0000

description:
Avoid updating of the state if the state is not changed
not to reset the timer for state machine

diffstat:

 sys/net/if_spppsubr.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 0ba8a8c43c8d -r e55200768e37 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Mon Apr 26 08:37:54 2021 +0000
+++ b/sys/net/if_spppsubr.c     Mon Apr 26 08:42:19 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.224 2021/04/26 08:37:54 yamaguchi Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.225 2021/04/26 08:42:19 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.224 2021/04/26 08:37:54 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.225 2021/04/26 08:42:19 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -2153,9 +2153,10 @@
                        cp->scr(sp);
                        cp->scan(cp, sp);
                        break;
-               case STATE_ACK_SENT:
                case STATE_REQ_SENT:
                        sppp_cp_change_state(cp, sp, STATE_ACK_SENT);
+                       /* fall through */
+               case STATE_ACK_SENT:
                        cp->scan(cp, sp);
                        break;
                case STATE_STOPPED:
@@ -2202,8 +2203,9 @@
                        cp->scan(cp, sp);
                        break;
                case STATE_ACK_SENT:
+                       sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
+                       /* fall through */
                case STATE_REQ_SENT:
-                       sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
                        cp->scan(cp, sp);
                        break;
                case STATE_STOPPED:



Home | Main Index | Thread Index | Old Index