aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-22 18:55:49 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-22 18:55:49 +0000
commit6215931bffed74b6e02062f28b0f22f4090da727 (patch)
tree60f1d8a6de1c759f13838773816992f35fc5e1d6 /options.c
parent--ip-win32 adaptive is now the default. (diff)
downloadopenvpn-6215931bffed74b6e02062f28b0f22f4090da727.tar.xz
Added new option --route-method adaptive (Win32)
which tries IP helper API first, then falls back to route.exe. Made --route-method adaptive the default. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@858 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'options.c')
-rw-r--r--options.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/options.c b/options.c
index 75c8825..6614c3e 100644
--- a/options.c
+++ b/options.c
@@ -644,7 +644,7 @@ init_options (struct options *o)
#endif
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;
+ o->route_method = ROUTE_METHOD_ADAPTIVE;
#endif
#ifdef USE_PTHREAD
o->n_threads = 1;
@@ -4318,13 +4318,15 @@ add_option (struct options *options,
else if (streq (p[0], "route-method") && p[1])
{
VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS);
- if (streq (p[1], "ipapi"))
+ if (streq (p[1], "adaptive"))
+ options->route_method = ROUTE_METHOD_ADAPTIVE;
+ else if (streq (p[1], "ipapi"))
options->route_method = ROUTE_METHOD_IPAPI;
else if (streq (p[1], "exe"))
options->route_method = ROUTE_METHOD_EXE;
else
{
- msg (msglevel, "--route method must be 'ipapi' or 'exe'");
+ msg (msglevel, "--route method must be 'adaptive', 'ipapi', or 'exe'");
goto err;
}
}