summaryrefslogtreecommitdiff
path: root/openvpn/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-24 18:28:03 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-24 18:28:03 +0200
commit7e02edb743934f4040fd1aac1cba4a121b66a228 (patch)
tree58e065bf5daba1d8ca1d99b69ae4dad6afa6c700 /openvpn/src
parent6d113da4ac3b8689bc803109cff04425da26c78b (diff)
Better way of fixing port warning
Diffstat (limited to 'openvpn/src')
-rw-r--r--openvpn/src/openvpn/init.c4
-rw-r--r--openvpn/src/openvpn/options.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/openvpn/src/openvpn/init.c b/openvpn/src/openvpn/init.c
index 93ea2f99..810a0c6f 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 a2d0f6eb..dae36103 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]);