diff options
author | Lev Stipakov <lstipakov@gmail.com> | 2015-10-10 13:14:29 +0300 |
---|---|---|
committer | Gert Doering <gert@greenie.muc.de> | 2015-10-10 12:19:53 +0200 |
commit | b05a453be5dd21326e79f42b0a363f2f23eaa29a (patch) | |
tree | 95d1f7a351a672b3b77f4528cdee09d7ef91e436 /src | |
parent | 2bed089d31a12c2d0277e36a64964ebab6640f75 (diff) | |
download | openvpn-b05a453be5dd21326e79f42b0a363f2f23eaa29a.tar.gz openvpn-b05a453be5dd21326e79f42b0a363f2f23eaa29a.tar.xz openvpn-b05a453be5dd21326e79f42b0a363f2f23eaa29a.zip |
Fix compilation error with --disable-crypto
Also disable "ENETUNREACH -> restart" behavior for static key setup.
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1444472069-32036-1-git-send-email-lstipakov@gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10231
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/openvpn/forward.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 513fbae..c17be35 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1199,13 +1199,16 @@ process_outgoing_link (struct context *c) if (c->c2.buf.len > 0 ) register_activity (c, size); + +#ifdef ENABLE_CRYPTO /* for unreachable network and "connecting" state switch to the next host */ - if (size < 0 && ENETUNREACH == error_code && !tls_initial_packet_received (c->c2.tls_multi) - && c->options.mode == MODE_POINT_TO_POINT) + if (size < 0 && ENETUNREACH == error_code && c->c2.tls_multi && + !tls_initial_packet_received (c->c2.tls_multi) && c->options.mode == MODE_POINT_TO_POINT) { msg (M_INFO, "Network unreachable, restarting"); register_signal (c, SIGUSR1, "network-unreachable"); } +#endif } else { |