Fix FreeBSD tun handling with net.link.tun.devfs_cloning=0
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 1 Jun 2012 18:58:26 +0000 (19:58 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 1 Jun 2012 19:02:35 +0000 (20:02 +0100)
commit6d94137cb74823ef041f8f5def181b381432af23
tree62a0f724de835cf4a6a651fea1c650be59ef5d9b
parent422e196ae40aa157d870536e741b10aab2146fa6
Fix FreeBSD tun handling with net.link.tun.devfs_cloning=0

Try to use SIOCIFCREATE to create an interface if it doesn't already exists.
Also try opening /dev/tun to get the next available device, before falling
back to the loop over tun0-tun255.

There is still strangeness here; sometimes the interface doesn't get an
IPv6 link-local address, and the IFDISABLED flag remains set.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
configure.ac
tun.c