From: Antonio Quartulli Date: Thu, 18 Aug 2022 14:44:31 +0000 (+0200) Subject: dco: trigger ping timeout event only if the peer expired X-Git-Tag: v2.6_beta1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a179d788c77d537b3a302320ebc476ca412c4e44;p=thirdparty%2Fopenvpn.git dco: trigger ping timeout event only if the peer expired DEL_PEER events can be sent by ovpn-dco to userspace for various reasons. We should trigger the ping timeout reaction only if the reason was "peer has expired". Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Message-Id: <20220818144431.208337-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25000.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index e45aa0f97..468eeee01 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1127,7 +1127,8 @@ process_incoming_dco(struct context *c) dco_do_read(dco); - if (dco->dco_message_type == OVPN_CMD_DEL_PEER) + if ((dco->dco_message_type == OVPN_CMD_DEL_PEER) + && (dco->dco_del_peer_reason == OVPN_DEL_PEER_REASON_EXPIRED)) { trigger_ping_timeout_signal(c); return;