Commit
45a1cb2a ("Disable DCO if proxy is set via management")
attempted to disable DCO when proxy is set via management interface. However,
at least on Windows this doesn't work, since:
- setting tuntap_options->disable_dco to true is not enough to disable DCO
- at this point it is a bit too late, since we've already done DCO-specific
adjustments
Since proxy can be set via management only if --management-query-proxy is
specified, the better way is to add a check to dco_check_startup_option().
Github: fixes OpenVPN/openvpn#522
Change-Id: I16d6a9fefa317d7d4a195e786618328445bdbca8
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20240318181744.20625-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28415.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit fd6b8395f6cee8a61111c28f335ec25ed6db11f7)
| ... | ... |
@@ -387,6 +387,12 @@ dco_check_startup_option(int msglevel, const struct options *o) |
| 387 | 387 |
return false; |
| 388 | 388 |
} |
| 389 | 389 |
|
| 390 |
+ if (o->management_flags & MF_QUERY_PROXY) |
|
| 391 |
+ {
|
|
| 392 |
+ msg(msglevel, "Note: --management-query-proxy disables data channel offload."); |
|
| 393 |
+ return false; |
|
| 394 |
+ } |
|
| 395 |
+ |
|
| 390 | 396 |
/* now that all options have been confirmed to be supported, check |
| 391 | 397 |
* if DCO is truly available on the system |
| 392 | 398 |
*/ |
| ... | ... |
@@ -221,12 +221,6 @@ management_callback_proxy_cmd(void *arg, const char **p) |
| 221 | 221 |
} |
| 222 | 222 |
else if (p[2] && p[3]) |
| 223 | 223 |
{
|
| 224 |
- if (dco_enabled(&c->options)) |
|
| 225 |
- {
|
|
| 226 |
- msg(M_INFO, "Proxy set via management, disabling Data Channel Offload."); |
|
| 227 |
- c->options.tuntap_options.disable_dco = true; |
|
| 228 |
- } |
|
| 229 |
- |
|
| 230 | 224 |
if (streq(p[1], "HTTP")) |
| 231 | 225 |
{
|
| 232 | 226 |
struct http_proxy_options *ho; |