When we fail initialisation the connection (e.g. P2P cipher NCP), we have
a non-working connection. Even though previous version would then stay in
this state, it does not really make sense to be in this state until the
keepalive timeout expires and triggers a USR1 anyway.

Signed-off-by: Arne Schwabe <a...@rfc2549.org>
---
 src/openvpn/forward.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 37340aef5..1b418b1bc 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -344,7 +344,10 @@ check_connection_established(struct context *c)
         }
         else
         {
-            do_up(c, false, 0);
+            if (!do_up(c, false, 0))
+            {
+                register_signal(c, SIGUSR1, "connection initialisation 
failed");
+            }
         }
 
         event_timeout_clear(&c->c2.wait_for_connect);
-- 
2.37.1 (Apple Git-137.1)



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to