Source-Changes-HG archive

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

[src/trunk]: src/sys/net Don't change ifp->if_link_state directly. Pointed o...



details:   https://anonhg.NetBSD.org/src/rev/ed7297a1a115
branches:  trunk
changeset: 363368:ed7297a1a115
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Mar 07 04:06:20 2022 +0000

description:
Don't change ifp->if_link_state directly.  Pointed out by yamaguchi@n.o.

diffstat:

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

diffs (27 lines):

diff -r 7fa4b0490f4c -r ed7297a1a115 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Sun Mar 06 23:36:50 2022 +0000
+++ b/sys/net/if_spppsubr.c     Mon Mar 07 04:06:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.261 2021/10/25 02:10:56 knakahara Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.262 2022/03/07 04:06:20 knakahara Exp $       */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.261 2021/10/25 02:10:56 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.262 2022/03/07 04:06:20 knakahara Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1103,7 +1103,7 @@
        if_alloc_sadl(ifp);
 
        /* Lets not beat about the bush, we know we're down. */
-       ifp->if_link_state = LINK_STATE_DOWN;
+       if_link_state_change(ifp, LINK_STATE_DOWN);
 
        snprintf(xnamebuf, sizeof(xnamebuf), "%s.wq_cp", ifp->if_xname);
        sp->wq_cp = sppp_wq_create(sp, xnamebuf,



Home | Main Index | Thread Index | Old Index