]> git.feebdaed.xyz Git - 0xmirror/openvpn.git/commitdiff
multi-socket: remove duplicated/dead code
authorGianmarco De Gregori <gianmarco@mandelbit.com>
Sat, 22 Nov 2025 18:52:33 +0000 (19:52 +0100)
committerGert Doering <gert@greenie.muc.de>
Sat, 22 Nov 2025 21:39:05 +0000 (22:39 +0100)
Removed the event_ctl() for ENABLE_ASYNC_PUSH
in io_wait_dowork() since that function is
not executed by servers anymore.

Removed a duplicated code in multi_io_process_io()
for new incoming TCP connections since the same
thing is done couple lines above.

Change-Id: Id1457f8432b4f0a69108b91ca12f2cbd0818f90d
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1384
Message-Id: <20251122185239.26312-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34593.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/multi_io.c

index f01fb4cf4e435a4221cbe1f178d7ce07bfaf9a9e..a6d339487cb26e1a4170b0fd75be31de2e4398f3 100644 (file)
@@ -2214,9 +2214,7 @@ io_wait_dowork(struct context *c, const unsigned int flags)
     static uintptr_t management_shift =
         MANAGEMENT_SHIFT; /* depends on MANAGEMENT_READ and MANAGEMENT_WRITE */
 #endif
-#ifdef ENABLE_ASYNC_PUSH
-    static uintptr_t file_shift = FILE_SHIFT;
-#endif
+
 #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
     static uintptr_t dco_shift = DCO_SHIFT; /* Event from DCO linux kernel module */
 #endif
@@ -2242,14 +2240,6 @@ io_wait_dowork(struct context *c, const unsigned int flags)
     }
 #endif
 
-#ifdef ENABLE_ASYNC_PUSH
-    /* arm inotify watcher */
-    if (c->options.mode == MODE_SERVER)
-    {
-        event_ctl(c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void *)file_shift);
-    }
-#endif
-
     /*
      * Possible scenarios:
      *  (1) tcp/udp port has data available to read
index 6e31687c3c4d793e7e9568e14ab998d078e2e4e8..fe7245615be9017e27aebe4e2d0e3bb488a1dad2 100644 (file)
@@ -500,18 +500,7 @@ multi_io_process_io(struct multi_context *m)
                         multi_io_action(m, NULL, TA_TUN_READ, false);
                     }
                 }
-                /* new incoming TCP client attempting to connect? */
-                else if (e->arg == MULTI_IO_SOCKET)
-                {
-                    struct multi_instance *mi;
-                    ASSERT(m->top.c2.link_sockets[0]);
-                    socket_reset_listen_persistent(m->top.c2.link_sockets[0]);
-                    mi = multi_create_instance_tcp(m, m->top.c2.link_sockets[0]);
-                    if (mi)
-                    {
-                        multi_io_action(m, mi, TA_INITIAL, false);
-                    }
-                }
+
 #if defined(ENABLE_DCO)
                 /* incoming data on DCO? */
                 else if (e->arg == MULTI_IO_DCO)