From 8187bbba5cdfa46fec2595f5f05384fd77eb5714 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 30 Nov 2022 17:57:12 +0100 Subject: [PATCH] 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 Acked-by: Gert Doering 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 --- 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.47.2