summaryrefslogtreecommitdiffstats
path: root/src/openvpn/tun.h
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-06-21 12:48:28 +0200
committerGert Doering <gert@greenie.muc.de>2013-07-03 20:47:01 +0200
commitfbc04bedbcce02fc625357b7475ddbc7164cabbf (patch)
tree2d54a71d299c3f08c5437cf82500c16b485ab985 /src/openvpn/tun.h
parentd0c4c442a44f85c18903b4edba9c1d726f6983c0 (diff)
downloadopenvpn-fbc04bedbcce02fc625357b7475ddbc7164cabbf.tar.gz
openvpn-fbc04bedbcce02fc625357b7475ddbc7164cabbf.tar.xz
openvpn-fbc04bedbcce02fc625357b7475ddbc7164cabbf.zip
Add support of utun devices under Mac OS X
Mac OS X 10.7+ natively supports tun devices (called utun). The "standard" utun.ko driver is sometimes problematic (e.g. VmWare Fusion 5 and tun.ko do not work together). When OpenVPN is compiled with utun support it will if no dev-node is given first try to use utun and if that is not available will try the traditional tun devices v2: Fixed tap support, get device name via ioctl, add manage v3.1: Fix compiling without if/utun.h, fix manage errors v4/v5: Don't try open to dynamically open utun0 -255 when early utun initialization fails, fix fallback to tun, give fatal error message when utun fails but no tun fallback should be done v6: add commit message change log, replace strstr with strncmp, move v7: Throw error if a user does the strange combination of --dev tun --dev-type tap and --dev-node utun A lot good input on earlier patches by Jonathan K. Bullard <jkbullard@gmail.com> Parts of the patches are inspired from Peter Sagerson's <psagers@ignorare.net> utun patch Signed-off-by: Arne Schwabe <arne@rfc2549.org> Tested-by: Jonathan K. Bullard <jkbullard@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1371811708-8528-1-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/7739 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/tun.h')
-rw-r--r--src/openvpn/tun.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h
index 956ad8d..2c97ffe 100644
--- a/src/openvpn/tun.h
+++ b/src/openvpn/tun.h
@@ -181,6 +181,9 @@ struct tuntap
int ip_fd;
#endif
+#ifdef HAVE_NET_IF_UTUN_H
+ bool is_utun;
+#endif
/* used for printing status info only */
unsigned int rwflags_debug;