]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix compilation error with --disable-crypto
authorLev Stipakov <lstipakov@gmail.com>
Sat, 10 Oct 2015 10:14:29 +0000 (13:14 +0300)
committerGert Doering <gert@greenie.muc.de>
Sat, 10 Oct 2015 10:19:53 +0000 (12:19 +0200)
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>
src/openvpn/forward.c

index 513fbae9bc5d7e869ede121a907de671012e6399..c17be3514e58de3f3c14a31faf53e6c8b92d6af4 100644 (file)
@@ -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
     {