tap_fix_new.patch

alexh, 08/30/2009 01:02 PM

Download (797 Bytes)

View differences:

sys/net/tap/if_tap.c
288 288

  
289 289
	tp = tapfind(unit);
290 290
	if (tp == NULL) {
291
		devfs_clone_bitmap_set(&DEVFS_CLONE_BITMAP(tap), unit);
292
		dev = make_dev(&tap_ops, unit, UID_ROOT, GID_WHEEL,
293
			       0600, "%s%d", TAP, unit);
291
		if (!devfs_clone_bitmap_chk(&DEVFS_CLONE_BITMAP(tap), unit)) {
292
			devfs_clone_bitmap_set(&DEVFS_CLONE_BITMAP(tap), unit);
293
			dev = make_dev(&tap_ops, unit, UID_ROOT, GID_WHEEL,
294
					   0600, "%s%d", TAP, unit);
295
		} else {
296
			dev = devfs_find_device_by_name("%s%d", TAP, unit);
297
		}
298

  
299
		KKASSERT(dev != NULL);
294 300
		tp = tapcreate(unit, dev);
295 301
	}
296 302
	tp->tap_flags |= TAP_CLONE;