I was going to ask for a feature yesterday, but though I'd write it myself instead of just asking for others todo things for me :-)

I have about 15 OpenVPN configs on my Windows machine, but I only use 2-3 simulatainously. But, as I need be able to connect to more than one site, I've had to create one TAP device for EVERY config file, as I had to specify the the dev-node in every config if I had installed more than one TAP device.

With the attached patch this behavior is modified so that if dev-node is not specified, OpenVPN tries to open the first TAP device is finds. If CreateFile() fails on this device, it moves on and tries to open next device.

If all CreateFile() fails on all avaiable TAP devices, first then openvpn terminates.

This works great as long as all TAP configuration is done dynamically from OpenVPN which is always the case for me. If you have static configuration done on the TAP devices, you need to use dev-node to specify which device to use anyway, so I don't think this patch should brake anything.

--
_____________________________________________________________
Mathias Sundman                  (^)   ASCII Ribbon Campaign
OpenVPN GUI for Windows           X    NO HTML/RTF in e-mail
http://www.nilings.se/openvpn    / \   NO Word docs in e-mail

Attachment: openvpn-autoselectdevice.patch
Description: Binary data

Reply via email to