[Openvpn-devel,1/4] Handle (DCO) timeouts in client mode

Message ID 20220429170236.48239-2-kprovost@netgate.com
State Superseded
Headers show
Series
  • [Openvpn-devel,1/4] Handle (DCO) timeouts in client mode
Related show

Commit Message

Kristof Provost via Openvpn-devel April 29, 2022, 5:02 p.m.
From: Kristof Provost <kp@FreeBSD.org>

Handle the DCO driver telling us that the peer went away, even if we're
not running in multi-instance mode.

Signed-off-by:	Kristof Provost <kprovost@netgate.com>
---
 src/openvpn/forward.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Antonio Quartulli May 9, 2022, 11:51 a.m. | #1
Hi,

On 29/04/2022 19:02, Kristof Provost via Openvpn-devel wrote:
> From: Kristof Provost <kp@FreeBSD.org>
> 
> Handle the DCO driver telling us that the peer went away, even if we're
> not running in multi-instance mode.
> 
> Signed-off-by:	Kristof Provost <kprovost@netgate.com>

I squashed this change in the dco branch.
Thanks a lot!

Regards,

Patch

diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index 9ddea439..e4215b70 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -1111,6 +1111,12 @@  process_incoming_dco(struct context *c)
 
     dco_do_read(dco);
 
+    if (dco->dco_message_type == OVPN_CMD_DEL_PEER)
+    {
+        trigger_ping_timeout_signal(c);
+        return;
+    }
+
     if (dco->dco_message_type != OVPN_CMD_PACKET)
     {
         msg(D_DCO_DEBUG, "%s: received message of type %u - ignoring", __func__,