]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Signal USR1 when connection initialising fails
authorArne Schwabe <arne@rfc2549.org>
Wed, 30 Nov 2022 16:57:12 +0000 (17:57 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 30 Nov 2022 20:34:15 +0000 (21:34 +0100)
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 <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221130165712.159683-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25596.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c

index 37340aef53efee8798b1212cb4ece8d20553eb9d..1b418b1bc595ff8c291ad4bf406af2a8b0cc3141 100644 (file)
@@ -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);