From 7e02edb743934f4040fd1aac1cba4a121b66a228 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 24 May 2012 18:28:03 +0200 Subject: Better way of fixing port warning --- openvpn/src/openvpn/init.c | 4 ++-- openvpn/src/openvpn/options.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'openvpn/src') diff --git a/openvpn/src/openvpn/init.c b/openvpn/src/openvpn/init.c index 93ea2f9..810a0c6 100644 --- a/openvpn/src/openvpn/init.c +++ b/openvpn/src/openvpn/init.c @@ -2292,10 +2292,10 @@ do_init_crypto_tls (struct context *c, const unsigned int flags) to.mda_context = &c->c2.mda_context; #endif + to.tmp_dir = options->tmp_dir; #if P2MP_SERVER to.auth_user_pass_verify_script = options->auth_user_pass_verify_script; to.auth_user_pass_verify_script_via_file = options->auth_user_pass_verify_script_via_file; - to.tmp_dir = options->tmp_dir; if (options->ccd_exclusive) to.client_config_dir_exclusive = options->client_config_dir; #endif @@ -2477,7 +2477,7 @@ do_option_warnings (struct context *c) { const struct options *o = &c->options; -#if 0 /* JYFIXME -- port warning */ +#if 1 /* JYFIXME -- port warning */ if (!o->ce.port_option_used && (o->ce.local_port == OPENVPN_PORT && o->ce.remote_port == OPENVPN_PORT)) msg (M_WARN, "IMPORTANT: OpenVPN's default port number is now %d, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.", OPENVPN_PORT); diff --git a/openvpn/src/openvpn/options.c b/openvpn/src/openvpn/options.c index a2d0f6e..dae3610 100644 --- a/openvpn/src/openvpn/options.c +++ b/openvpn/src/openvpn/options.c @@ -4518,6 +4518,7 @@ add_option (struct options *options, goto err; } re.remote_port = port; + options->ce.port_option_used = true; if (p[3]) { const int proto = ascii2proto (p[3]); -- cgit v1.2.3