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>
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;