From: Lev Stipakov Date: Sat, 10 Oct 2015 10:14:29 +0000 (+0300) Subject: Fix compilation error with --disable-crypto X-Git-Tag: v2.4_alpha1~226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b05a453be5dd21326e79f42b0a363f2f23eaa29a;p=thirdparty%2Fopenvpn.git Fix compilation error with --disable-crypto Also disable "ENETUNREACH -> restart" behavior for static key setup. Acked-by: Arne Schwabe 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 --- diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 513fbae9b..c17be3514 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 {