[Openvpn-devel,v1] Fix multi-socket and dco-win interaction

Message ID 20250912131056.42342-1-frank@lichtenheld.com
State New
Headers show
Series [Openvpn-devel,v1] Fix multi-socket and dco-win interaction | expand

Commit Message

Frank Lichtenheld Sept. 12, 2025, 1:10 p.m. UTC
From: Gianmarco De Gregori <gianmarco@mandelbit.com>

The dco_check_option_ce(), for dco_win, checked only
the global protocol of the current connection entry,
but now it should be extended to the local_list
and since dco_win does not support more than 1
socket, checking the first entry of the local_list
will be enough.

Change-Id: I74e2b6aed3c7454e897db57f777e6a191be3d87f
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
---

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

Acked-by according to Gerrit (reflected above):
Lev Stipakov <lstipakov@gmail.com>

Patch

diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index 1abebbb..70a8c0a 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -268,7 +268,7 @@ 
 #endif
 
 #if defined(_WIN32)
-    if (!proto_is_udp(ce->proto) && mode == MODE_SERVER)
+    if (!proto_is_udp(ce->local_list->array[0]->proto) && mode == MODE_SERVER)
     {
         msg(msglevel,
             "NOTE: TCP transport disables data channel offload on Windows in server mode.");