From: Kristof Provost Date: Tue, 26 Apr 2022 18:29:34 +0200 Message-Id: <20220426162934.12938-2-kprovost@...2661...> In-Reply-To: <20220426162934.12938-1-kprovost@...2661...> References: <20220426162934.12938-1-kprovost@...2661...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH] Handle (DCO) timeouts in client mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel From: Kristof Provost Handle the DCO driver telling us that the peer went away, even if we're not running in multi-instance mode. Signed-off-by: Kristof Provost --- src/openvpn/forward.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 9ddea439..25fa300f 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1111,6 +1111,12 @@ process_incoming_dco(struct context *c) dco_do_read(dco); + if (dco->dco_message_type == OVPN_NOTIF_DEL_PEER) + { + register_signal(c, SIGTERM, "ping timeout"); + return; + } + if (dco->dco_message_type != OVPN_CMD_PACKET) { msg(D_DCO_DEBUG, "%s: received message of type %u - ignoring", __func__, -- 2.36.0