summaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init.c')
-rw-r--r--init.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/init.c b/init.c
index 4b2a8d0..5f64c05 100644
--- a/init.c
+++ b/init.c
@@ -122,7 +122,8 @@ ce_http_proxy_fallback_defined(const struct context *c)
int i;
for (i = 0; i < l->len; ++i)
{
- if (l->array[i]->flags & CE_HTTP_PROXY_FALLBACK)
+ const struct connection_entry *ce = l->array[i];
+ if (ce->flags & CE_HTTP_PROXY_FALLBACK)
return true;
}
}
@@ -193,12 +194,9 @@ management_callback_http_proxy_fallback_cmd (void *arg, const char *server, cons
struct connection_entry *ce = l->array[i];
if (ce->flags & CE_HTTP_PROXY_FALLBACK)
{
- if (ho)
- {
- ce->http_proxy_options = ho;
- ret = true;
- }
+ ce->http_proxy_options = ho;
ce->ce_http_proxy_fallback_timestamp = now;
+ ret = true;
}
}
}
@@ -278,7 +276,7 @@ next_connection_entry (struct context *c)
do {
const char *remote_ip_hint = NULL;
- bool advanced = false;
+ bool newcycle = false;
ce_defined = true;
if (l->no_advance && l->current >= 0)
@@ -295,7 +293,8 @@ next_connection_entry (struct context *c)
msg (M_FATAL, "No usable connection profiles are present");
}
- advanced = true;
+ if (l->current == 0)
+ newcycle = true;
show_connection_list(l);
}
@@ -305,7 +304,7 @@ next_connection_entry (struct context *c)
remote_ip_hint = c->options.remote_ip_hint;
#if HTTP_PROXY_FALLBACK
- if (advanced && ce_http_proxy_fallback_defined(c))
+ if (newcycle && ce_http_proxy_fallback_defined(c))
ce_http_proxy_fallback_start(c, remote_ip_hint);
if (ce->flags & CE_HTTP_PROXY_FALLBACK)
@@ -1139,6 +1138,10 @@ initialization_sequence_completed (struct context *c, const unsigned int flags)
if ((flags & (ISC_ERRORS|ISC_SERVER)) == 0 && connection_list_defined (&c->options))
connection_list_set_no_advance (&c->options);
+#ifdef WIN32
+ fork_register_dns_action (c->c1.tuntap);
+#endif
+
#ifdef ENABLE_MANAGEMENT
/* Tell management interface that we initialized */
if (management)
@@ -1188,7 +1191,7 @@ do_route (const struct options *options,
struct argv argv = argv_new ();
setenv_str (es, "script_type", "route-up");
argv_printf (&argv, "%sc", options->route_script);
- openvpn_execve_check (&argv, es, S_SCRIPT, "Route script failed");
+ openvpn_run_script (&argv, es, 0, "--route-up");
argv_reset (&argv);
}
@@ -2021,6 +2024,7 @@ do_init_crypto_tls (struct context *c, const unsigned int flags)
#endif
to.verify_command = options->tls_verify;
+ to.verify_export_cert = options->tls_export_cert;
to.verify_x509name = options->tls_remote;
to.crl_file = options->crl_file;
to.ns_cert_type = options->ns_cert_type;