[Openvpn-devel,v2] Explicit-exit-notify and multisocket interaction

Message ID 20250518172329.21239-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v2] Explicit-exit-notify and multisocket interaction | expand

Commit Message

Gert Doering May 18, 2025, 5:23 p.m. UTC
From: Gianmarco De Gregori <gianmarco@mandelbit.com>

Check signals after timeout handling to avoid
unusual delay when using explicit-exit-notify.

Github: fixes OpenVPN/openvpn#702

Change-Id: Id9dbb4d3c550bd4c13f6ee97e67749686457d9fc
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/917
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering May 18, 2025, 5:27 p.m. UTC | #1
Does the job :-) - back to 2.6 level wrt "ctrl-c and EEN".

The whole event loop looks a bit unsatisfying, though, with checking
the signals twice in such a short loop... but I guess this needs much
deeper digging.

Your patch has been applied to the master branch.

commit 565d7cf48120d4394258fc3f2aa1b710315cd4e9
Author: Gianmarco De Gregori
Date:   Sun May 18 19:23:23 2025 +0200

     Explicit-exit-notify and multisocket interaction

     Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20250518172329.21239-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31688.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index a673ec1..8e2c4d4 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -4265,13 +4265,13 @@ 
         {
             /* process the I/O which triggered select */
             multi_io_process_io(multi);
-            MULTI_CHECK_SIG(multi);
         }
         else if (status == 0)
         {
             multi_io_action(multi, NULL, TA_TIMEOUT, false);
         }
 
+        MULTI_CHECK_SIG(multi);
         perf_pop();
     }
 }