tap - Don't make_dev if dev already exists
authorAlex Hornung <ahornung@gmail.com>
Sun, 30 Aug 2009 17:44:30 +0000 (18:44 +0100)
committerAlex Hornung <ahornung@gmail.com>
Mon, 31 Aug 2009 09:29:28 +0000 (10:29 +0100)
commit527e4a212528eb64553709ba0116c0b80968ec7e
treecccad6b76b340547f0c5d865b4a405cb43a67f19
parentdd3e6a730a745fcc6cc6e1e79b109fdcb6fd4b21
tap - Don't make_dev if dev already exists

* If the unit already exists when calling tap_clone_create,
find the corresponding cdev by calling
devfs_find_device_by_name.
* If the unit doesn't exist, call make_dev.
* Assert that dev != NULL before calling tapcreate()

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1453
Reported-By: Rumko
sys/net/tap/if_tap.c