Source-Changes-HG archive

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

[src/trunk]: src/sys/net tap: link up an interface cloned from /dev/tap



details:   https://anonhg.NetBSD.org/src/rev/5670b7bd755d
branches:  trunk
changeset: 372930:5670b7bd755d
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jan 06 01:54:22 2023 +0000

description:
tap: link up an interface cloned from /dev/tap

Fix PR 57155 (partially)

diffstat:

 sys/net/if_tap.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 957bc6c1c5ba -r 5670b7bd755d sys/net/if_tap.c
--- a/sys/net/if_tap.c  Thu Jan 05 20:32:18 2023 +0000
+++ b/sys/net/if_tap.c  Fri Jan 06 01:54:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tap.c,v 1.127 2022/04/10 09:50:46 andvar Exp $      */
+/*     $NetBSD: if_tap.c,v 1.128 2023/01/06 01:54:22 ozaki-r Exp $     */
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.127 2022/04/10 09:50:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.128 2023/01/06 01:54:22 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 
@@ -735,6 +735,7 @@
        }
 
        sc->sc_flags |= TAP_INUSE;
+       if_link_state_change(&sc->sc_ec.ec_if, LINK_STATE_UP);
 
        return fd_clone(fp, fd, FREAD | FWRITE, &tap_fileops,
            (void *)(intptr_t)device_unit(sc->sc_dev));



Home | Main Index | Thread Index | Old Index