On Sat, Sep 27, 2003 at 11:57:19PM +0200, Poul-Henning Kamp wrote: > > Please test this patch: > > http://phk.freebsd.dk/patch/if_tun.patch > > There is a slight change in semantics in that the interface will disappear > entirely when the /dev/tun%d device is closed. > > If no objections this will be committed in some days. > | Properly dismantle and remove the interface and destroy the dev_t > | at last close of the device. I'm not convinced this is the right direction to move in. The problem is that users are beginning to expect that pseudo-interfaces be created with network interface cloning, but tun, tap, and vmnet aren't. I'm concerned that this destroy on last close semantic will make it harder to implement that. I guess if we moved to a model where we allowed both methods to work, we could somehow add an extra reference when we cloned interfaces via "ifconfig <if> create", but I don't know the devfs side well enough to know if that's possible. This doesn't constitute an objection since I've had over a year to fix these drivers, but I'd appreciate it if you would give it some thought. -- Brooks P.S. Since you're moving it anyway, we make the assumption in the network code that the ifnet struct is the first member of the softc so you might want to fix tun while you're there. See the comment around if_var.h:111. -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:23 UTC