summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2011-06-02 19:12:02 +0000
committerderaadt <deraadt@openbsd.org>2011-06-02 19:12:02 +0000
commit8c2eeedd51df54a28243966cc96fbdbb94005dde (patch)
treeacaf5177206f392a6427c7ee98c855b58c4f26cf
parentInitialize the dv_unit, because disk_attach will want it later. Before (diff)
downloadwireguard-openbsd-8c2eeedd51df54a28243966cc96fbdbb94005dde.tar.xz
wireguard-openbsd-8c2eeedd51df54a28243966cc96fbdbb94005dde.zip
In vndclear(), clear all the flag bits. Leaving around a VNF_WLABEL bit
is stupid (verified to be the case). Other flag bits might have lived longer than they should as well, with unknown consequences. Spotted with matthew, too.
-rw-r--r--sys/dev/vnd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 54cb6d94066..cd8c9bc18e2 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.119 2011/06/02 19:10:19 deraadt Exp $ */
+/* $OpenBSD: vnd.c,v 1.120 2011/06/02 19:12:02 deraadt Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -789,7 +789,7 @@ vndclear(struct vnd_softc *vnd)
DNPRINTF(VDB_FOLLOW, "vndclear(%p): vp %p\n", vnd, vp);
- vnd->sc_flags &= ~VNF_INITED;
+ vnd->sc_flags = 0;
if (vp == NULL)
panic("vndioctl: null vp");
(void) vn_close(vp, VNDRW(vnd), vnd->sc_cred, p);