summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2015-05-24 15:02:34 +0200
committerGert Doering <gert@greenie.muc.de>2015-05-24 20:48:18 +0200
commit6478c1f359e6b0ea2046d9e2801830753e53c06a (patch)
tree0c89677203dea1f09956d59b90a563d9c5deadfc /src
parentf4684ff2b5622a26c7c2e620e789b7dca8cfd778 (diff)
downloadopenvpn-6478c1f359e6b0ea2046d9e2801830753e53c06a.tar.gz
openvpn-6478c1f359e6b0ea2046d9e2801830753e53c06a.tar.xz
openvpn-6478c1f359e6b0ea2046d9e2801830753e53c06a.zip
Disallow usage of --server-poll-timeout in --secret key mode.
The internal machinery wants TLS for this to work, so just add this to the (long) list of options not allowed unless either --tls-client or --tls-server is active. For added sanity, add an ASSERT() call to the place where this combination caused a NULL ptr reference, and document the restriction. Fix trac #373 Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Steffan Karger <steffan.karger@fox-it.com> Message-Id: <1432472554-24666-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/9736
Diffstat (limited to 'src')
-rw-r--r--src/openvpn/forward.c1
-rw-r--r--src/openvpn/options.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index a3323e9..6d459d2 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -328,6 +328,7 @@ void
check_server_poll_timeout_dowork (struct context *c)
{
event_timeout_reset (&c->c2.server_poll_interval);
+ ASSERT(c->c2.tls_multi);
if (!tls_initial_packet_received (c->c2.tls_multi))
{
msg (M_INFO, "Server poll timeout, restarting");
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index bc7f3c6..8487ce1 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2310,6 +2310,9 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
MUST_BE_UNDEF (pkcs11_id);
MUST_BE_UNDEF (pkcs11_id_management);
#endif
+#if P2MP
+ MUST_BE_UNDEF (server_poll_timeout);
+#endif
if (pull)
msg (M_USAGE, err, "--pull");