Message ID | 20250912131207.42597-1-frank@lichtenheld.com |
---|---|
State | New |
Headers | show |
Series | [Openvpn-devel,v3] Multi-socket win: avoid repeated socket_set() | expand |
I can't claim I understand what exactly upsets what here, but since Gianmarco is the "multi event expert" and Lev has confirmed that this fixes the observed windows issues, *and* there is now a comment that explains to casual readers what this is about, good enough for me :-) (plus the CI infra agrees that things still work). Again, mail-archive.org claims this was never sent to the list, so linking to sf.net archive & our gerrit. Your patch has been applied to the master branch. commit 3b429925fb9b4a822facc6ea9f13b927b6021944 Author: Gianmarco De Gregori Date: Fri Sep 12 15:12:07 2025 +0200 Multi-socket win: avoid repeated socket_set() Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com> Acked-by: Lev Stipakov <lstipakov@gmail.com> Message-Id: <20250912131207.42597-1-frank@lichtenheld.com> URL: https://sourceforge.net/p/openvpn/mailman/message/59232443/ URL: https://gerrit.openvpn.net/c/openvpn/+/1174 Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 03b6a0c..5d22fa3 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -2121,10 +2121,15 @@ /* * Configure event wait based on socket, tuntap flags. + * (for TCP server sockets this happens in + * socket_set_listen_persistent()). */ for (int i = 0; i < c->c1.link_sockets_num; i++) { - socket_set(c->c2.link_sockets[i], es, socket, &c->c2.link_sockets[i]->ev_arg, NULL); + if ((c->options.mode != MODE_SERVER) || (proto_is_dgram(c->c2.link_sockets[i]->info.proto))) + { + socket_set(c->c2.link_sockets[i], es, socket, &c->c2.link_sockets[i]->ev_arg, NULL); + } } tun_set(c->c1.tuntap, es, tuntap, (void *)tun_shift, NULL);