Thu Jul 23 17:53:17 2009 UTC ()
Avoid a kernel assertion failure upstream by using FSTATE_NOTFOUND
rather than FSTATE_FOUND when setting the unit number directly.

config_attach_pseudo() will convert it to FSTATE_FOUND just after the
assertion.


(plunky)
diff -r1.57 -r1.58 src/sys/net/if_tap.c

cvs diff -r1.57 -r1.58 src/sys/net/if_tap.c (expand / switch to context diff)
--- src/sys/net/if_tap.c 2009/04/11 23:05:26 1.57
+++ src/sys/net/if_tap.c 2009/07/23 17:53:17 1.58
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.57 2009/04/11 23:05:26 christos Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.58 2009/07/23 17:53:17 plunky 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.57 2009/04/11 23:05:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.58 2009/07/23 17:53:17 plunky Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -658,7 +658,7 @@
 		cf->cf_fstate = FSTATE_STAR;
 	} else {
 		cf->cf_unit = unit;
-		cf->cf_fstate = FSTATE_FOUND;
+		cf->cf_fstate = FSTATE_NOTFOUND;
 	}
 
 	return device_private(config_attach_pseudo(cf));