Iterate over tunXX devices, for BSDs that can't just open /dev/tun to
retrieve the "next available tun".
This is just copied with minor changes from openconnect/src/tun.c,
Signed-off-by: Stuart Henderson <stu@spacehopper.org>
Hi Nikos, here are patches for a couple of issues which are stopping ocserv
from building on OpenBSD (and might be causing problems on other OS too).
There's a bit more to do for OpenBSD, it does need the iteration as done
in openconnect's tun.c:405-410, I might have another diff for that later.
Signed-off-by: Stuart Henderson <stu@spacehopper.org>