summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2013-05-25 10:05:52 +0000
committermikeb <mikeb@openbsd.org>2013-05-25 10:05:52 +0000
commiteb7e274b5e6cab5e1ea7ab2072cad816105cf9aa (patch)
tree56726ef21dd6040538108a7f8eb7dbe256c37ae9
parenttweak the "deliver to lmtp" text, and zap an extraneous space; (diff)
downloadwireguard-openbsd-eb7e274b5e6cab5e1ea7ab2072cad816105cf9aa.tar.xz
wireguard-openbsd-eb7e274b5e6cab5e1ea7ab2072cad816105cf9aa.zip
set the IFF_RUNNNING flag when recreating an interface after the
IFF_LINK0 flag has been added; from form, ok deraadt claudio
-rw-r--r--sys/net/if_tun.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index c47d00db2cd..576f565dd91 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.114 2013/03/28 16:55:27 deraadt Exp $ */
+/* $OpenBSD: if_tun.c,v 1.115 2013/05/25 10:05:52 mikeb Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -316,6 +316,7 @@ tun_switch(struct tun_softc *tp, int flags)
/* already opened before ifconfig tunX link0 */
s = splnet();
tp->tun_flags |= open;
+ ifp->if_flags |= IFF_RUNNING;
tun_link_state(tp);
splx(s);
TUNDEBUG(("%s: already open\n", tp->tun_if.if_xname));