Page MenuHomeFreeBSD

D42008.id127897.diff
No OneTemporary

D42008.id127897.diff

diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -548,6 +548,7 @@
if (i != 0)
i = tun_create_device(drv, unit, NULL, &dev, name);
if (i == 0) {
+ dev_ref(dev);
tuncreate(dev);
struct tuntap_softc *tp = dev->si_drv1;
*ifpp = tp->tun_ifp;
@@ -611,8 +612,10 @@
i = tun_create_device(drv, u, cred, dev, name);
}
- if (i == 0)
+ if (i == 0) {
+ dev_ref(*dev);
if_clone_create(name, namelen, NULL);
+ }
out:
CURVNET_RESTORE();
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 2:18 PM (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14658533
Default Alt Text
D42008.id127897.diff (517 B)

Event Timeline