Source-Changes-HG archive

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

[src/trunk]: src/sys/net loop: set LINK_STATE_UP a touch earlier



details:   https://anonhg.NetBSD.org/src/rev/2099708f54bd
branches:  trunk
changeset: 955857:2099708f54bd
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Oct 14 16:10:32 2020 +0000

description:
loop: set LINK_STATE_UP a touch earlier

diffstat:

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

diffs (34 lines):

diff -r 39ecedd9305b -r 2099708f54bd sys/net/if_loop.c
--- a/sys/net/if_loop.c Wed Oct 14 15:55:49 2020 +0000
+++ b/sys/net/if_loop.c Wed Oct 14 16:10:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_loop.c,v 1.111 2020/10/14 15:55:49 roy Exp $        */
+/*     $NetBSD: if_loop.c,v 1.112 2020/10/14 16:10:32 roy Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.111 2020/10/14 15:55:49 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.112 2020/10/14 16:10:32 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -203,6 +203,7 @@
                if_free(ifp);
                return rv;
        }
+       ifp->if_link_state = LINK_STATE_UP;
        if_alloc_sadl(ifp);
        bpf_attach(ifp, DLT_NULL, sizeof(u_int));
 #ifdef MBUFTRACE
@@ -214,7 +215,6 @@
 #endif
 
        ifp->if_flags |= IFF_RUNNING;
-       ifp->if_link_state = LINK_STATE_UP;
        if_register(ifp);
 
        return (0);



Home | Main Index | Thread Index | Old Index