summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-31 03:01:17 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-31 03:01:17 +0000
commitc67d59cd5c30534a4108945294284f29df7a6c84 (patch)
tree00f4471a4eba2fdb39f1c0b4a0021d6824eb2abb /options.c
parent1df5be59818066b89936b245e6974efee78529aa (diff)
downloadopenvpn-c67d59cd5c30534a4108945294284f29df7a6c84.tar.gz
openvpn-c67d59cd5c30534a4108945294284f29df7a6c84.tar.xz
openvpn-c67d59cd5c30534a4108945294284f29df7a6c84.zip
Windows reliability changes:
* Added code to make sure that the local PATH environmental variable points to the Windows system32 directory. * Added new --ip-win32 adaptive mode which tries 'dynamic' and then fails over to 'netsh' if the DHCP negotiation fails. * Made --ip-win32 adaptive the default. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@739 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'options.c')
-rw-r--r--options.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/options.c b/options.c
index 05a2d0f..324d525 100644
--- a/options.c
+++ b/options.c
@@ -612,7 +612,7 @@ init_options (struct options *o)
o->tuntap_options.txqueuelen = 100;
#endif
#ifdef WIN32
- o->tuntap_options.ip_win32_type = IPW32_SET_DHCP_MASQ;
+ o->tuntap_options.ip_win32_type = IPW32_SET_ADAPTIVE;
o->tuntap_options.dhcp_lease_time = 31536000; /* one year */
o->tuntap_options.dhcp_masq_offset = 0; /* use network address as internal DHCP server address */
o->route_method = ROUTE_METHOD_IPAPI;
@@ -1469,9 +1469,10 @@ options_postprocess (struct options *options, bool first_time)
&& !(pull || (options->ifconfig_local && options->ifconfig_remote_netmask)))
msg (M_USAGE, "On Windows, --ip-win32 doesn't make sense unless --ifconfig is also used");
- if (options->tuntap_options.dhcp_options &&
- options->tuntap_options.ip_win32_type != IPW32_SET_DHCP_MASQ)
- msg (M_USAGE, "--dhcp-options requires --ip-win32 dynamic");
+ if (options->tuntap_options.dhcp_options
+ && options->tuntap_options.ip_win32_type != IPW32_SET_DHCP_MASQ
+ && options->tuntap_options.ip_win32_type != IPW32_SET_ADAPTIVE)
+ msg (M_USAGE, "--dhcp-options requires --ip-win32 dynamic or adaptive");
if ((dev == DEV_TYPE_TUN || dev == DEV_TYPE_TAP) && !options->route_delay_defined)
{
@@ -4280,6 +4281,9 @@ add_option (struct options *options,
goto err;
}
+ if (index == IPW32_SET_ADAPTIVE)
+ options->route_delay_window = IPW32_SET_ADAPTIVE_DELAY_WINDOW;
+
if (index == IPW32_SET_DHCP_MASQ)
{
if (p[2])