]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dco: trigger ping timeout event only if the peer expired
authorAntonio Quartulli <a@unstable.cc>
Thu, 18 Aug 2022 14:44:31 +0000 (16:44 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 11 Sep 2022 10:03:11 +0000 (12:03 +0200)
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>
src/openvpn/forward.c

index e45aa0f9739c295f7b921971e72f045e81c58f87..468eeee012415bc19330e885abceee92725a43ec 100644 (file)
@@ -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;