Module Name:    src
Committed By:   ozaki-r
Date:           Fri Jan  6 01:54:23 UTC 2023

Modified Files:
        src/sys/net: if_tap.c

Log Message:
tap: link up an interface cloned from /dev/tap

Fix PR 57155 (partially)


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/net/if_tap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.127 src/sys/net/if_tap.c:1.128
--- src/sys/net/if_tap.c:1.127	Sun Apr 10 09:50:46 2022
+++ src/sys/net/if_tap.c	Fri Jan  6 01:54:22 2023
@@ -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 @@ tap_dev_cloner(struct lwp *l)
 	}
 
 	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));

Reply via email to