Message ID | 20250205122341.4944-1-gert@greenie.muc.de |
---|---|
State | New |
Headers | show |
Series | [Openvpn-devel,v2] dco-win: disable dco in server mode if multiple --local options defined | expand |
As discussed on IRC - this is a preliminary patch for making sure the windows "multi-peer support in DCO" patchset and the "multi-socket patchset" can cooperate peacefully, while win-dco has no multi-socket capability yet (due to the way win-dco socket handling differs from linux-dco/freebsd-dco, the challenges are different). There is also a GH issue to clean up the confusing code around --local and <connection> later... so we'll see more code changes here. Your patch has been applied to the master branch. commit 4719687ef3ec8acefcdde584df0e7fa86ddcf333 Author: Lev Stipakov Date: Wed Feb 5 13:23:41 2025 +0100 dco-win: disable dco in server mode if multiple --local options defined Signed-off-by: Lev Stipakov <lev@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20250205122341.4944-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30805.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index b5a2136..c65aece 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -279,6 +279,12 @@ msg(msglevel, "NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload"); return false; } + + if ((mode == MODE_SERVER) && (ce->local_list->len > 1)) + { + msg(msglevel, "NOTE: multiple --local options defined, disabling data channel offload"); + return false; + } #endif return true; @@ -355,6 +361,12 @@ return false; } + if ((o->mode == MODE_SERVER) && o->ce.local_list->len > 1) + { + msg(msglevel, "multiple --local options defined, disabling data channel offload"); + return false; + } + #elif defined(TARGET_LINUX) /* if the device name is fixed, we need to check if an interface with this * name already exists. IF it does, it must be a DCO interface, otherwise