Browse code

Signal USR1 when connection initialising fails

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>

Arne Schwabe authored on 2022/12/01 01:57:12
Showing 1 changed files
... ...
@@ -344,7 +344,10 @@ check_connection_established(struct context *c)
344 344
         }
345 345
         else
346 346
         {
347
-            do_up(c, false, 0);
347
+            if (!do_up(c, false, 0))
348
+            {
349
+                register_signal(c, SIGUSR1, "connection initialisation failed");
350
+            }
348 351
         }
349 352
 
350 353
         event_timeout_clear(&c->c2.wait_for_connect);