diff options
Diffstat (limited to 'tun.c')
-rw-r--r-- | tun.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -786,7 +786,24 @@ do_ifconfig (struct tuntap *tt, tt->did_ifconfig = true; #elif defined(TARGET_DARWIN) - +#ifdef DARWIN_USE_IPCONFIG + if (tun) + { + msg (M_FATAL, "Error: tun point-to-point mode not supported on Darwin when DARWIN_USE_IPCONFIG is defined"); + } + else + { + argv_printf (&argv, + "/usr/sbin/ipconfig set %s MANUAL %s %s", + actual, + ifconfig_local, + ifconfig_remote_netmask + ); + } + argv_msg (M_INFO, &argv); + openvpn_execve_check (&argv, es, S_FATAL, "Mac OS X ipconfig failed"); + tt->did_ifconfig = true; +#else /* * Darwin (i.e. Mac OS X) seems to exhibit similar behaviour to OpenBSD... */ @@ -832,9 +849,11 @@ do_ifconfig (struct tuntap *tt, tun_mtu ); } + argv_msg (M_INFO, &argv); openvpn_execve_check (&argv, es, S_FATAL, "Mac OS X ifconfig failed"); tt->did_ifconfig = true; +#endif /* Add a network route for the local tun interface */ if (!tun && tt->topology == TOP_SUBNET) |