Re: [Openvpn-devel] RFC: tun/tap cleanup at program end

2012-08-16 Thread Eric Crist
On Aug 15, 2012, at 05:53:40, Gert Doering wrote: > Hi, > > On Wed, Aug 15, 2012 at 12:00:12PM +0200, Gert Doering wrote: >> 3 - check for the existance of "--dev tap3" and remember, not cleaning >> if it existed previously, doing this with RT_NETLINK which should >> be sufficiently p

Re: [Openvpn-devel] RFC: tun/tap cleanup at program end

2012-08-15 Thread Gert Doering
Hi, On Wed, Aug 15, 2012 at 12:00:12PM +0200, Gert Doering wrote: > 3 - check for the existance of "--dev tap3" and remember, not cleaning > if it existed previously, doing this with RT_NETLINK which should > be sufficiently portable across all BSDs. Same advantage as "2", > h

Re: [Openvpn-devel] RFC: tun/tap cleanup at program end

2012-08-15 Thread Gert Doering
Hi, On Tue, Aug 14, 2012 at 09:47:36PM +0200, Gert Doering wrote: > I can see two options how to solve this: > > 1 - set a flag if a device has been opened using a dynamic number > ("--dev tap", which hunts for the first-free tapN device), and > if yes, destroy the device on tun_close()

[Openvpn-devel] RFC: tun/tap cleanup at program end

2012-08-14 Thread Gert Doering
Hi, background: I spent quite some time in the 2.3 development cycle in ensuring that OpenVPN quits nicely, leaving nothing behind - specifically, this meant "make sure that all tun/tap interfaces we have created are destroyed as well" - which is now breaking some people's setups :-/ On FreeBSD,