[Openvpn-devel,v1] multi_io: drop the read cases from multi_io_wait_lite()

Message ID 20261027124408.526-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] multi_io: drop the read cases from multi_io_wait_lite() |

Commit Message

Gert Doering Oct. 27, 2026, 12:44 p.m. UTC
  From: Gianmarco De Gregori <gianmarco@mandelbit.com>

multi_io_action() only polls before writes: reads are dispatched with
poll false, both from the event loop and when chaining a tun read
after a write. The TA_TUN_READ and TA_SOCKET_READ cases of
multi_io_wait_lite() are never reached.

Change-Id: I1abb10515665e1d6351689d2c2dd9d4aba8bb98e
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2044
---

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/+/2044
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
  

Patch

diff --git a/src/openvpn/multi_io.c b/src/openvpn/multi_io.c
index ac730b4..56216d4 100644
--- a/src/openvpn/multi_io.c
+++ b/src/openvpn/multi_io.c
@@ -235,18 +235,6 @@ 
 
     switch (action)
     {
-        case TA_TUN_READ:
-            looking_for = TUN_READ;
-            tun_input_pending = NULL;
-            io_wait(c, IOW_READ_TUN);
-            break;
-
-        case TA_SOCKET_READ:
-            looking_for = SOCKET_READ;
-            tun_input_pending = NULL;
-            io_wait(c, IOW_READ_LINK);
-            break;
-
         case TA_TUN_WRITE:
             looking_for = TUN_WRITE;
             tun_input_pending = NULL;