Skip to contentSkip to conversation

dco: trigger ping timeout event only if the peer expired

PATCH In review Antonio Quartulli 2 participants 2 messages Aug 18, 2022 – Sep 11, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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".

---
 src/openvpn/forward.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/openvpn/forward.c +2 -1
index d70b4f52..970be3bf 100644
@@ -1119,7 +1119,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;
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw

"This seems to make sense" :-) (aka, do what the commit message says)

Tested on the Ubuntu/DCO client/server test bench.

Your patch has been applied to the master branch.

commit a179d788c77d537b3a302320ebc476ca412c4e44

Author: Antonio Quartulli
Date:   Thu Aug 18 16:44:31 2022 +0200
     dco: trigger ping timeout event only if the peer expired

     Signed-off-by: Antonio Quartulli <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg25000.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering