From: Arne Schwabe Date: Wed, 30 Nov 2022 16:57:12 +0000 (+0100) Subject: Signal USR1 when connection initialising fails X-Git-Tag: v2.6_beta1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8187bbba5cdfa46fec2595f5f05384fd77eb5714;p=thirdparty%2Fopenvpn.git 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 --- 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);