aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Quartulli2022-08-18 16:44:31 +0200
committerGert Doering2022-09-11 12:03:11 +0200
commita179d788c77d537b3a302320ebc476ca412c4e44 (patch)
tree831beaa26781c193918bddb1433ad2d8742912a0
parent23eec2d29435a51771dcd4f85d71f33465a174ff (diff)
downloadopenvpn-a179d788c77d537b3a302320ebc476ca412c4e44.zip
openvpn-a179d788c77d537b3a302320ebc476ca412c4e44.tar.gz
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 <a@unstable.cc> Acked-by: Gert Doering <gert@greenie.muc.de> 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 <gert@greenie.muc.de>
-rw-r--r--src/openvpn/forward.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index e45aa0f..468eeee 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;