Skip to contentSkip to conversation

Disabe DCO if proxy is set via management

PATCH Superseded Lev Stipakov 3 participants 4 messages Feb 20, 2023 – Feb 21, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disabe DCO if proxy is set via management

From: Lev Stipakov <[email protected]...>

DCO doesn't support proxy and we already disable DCO is proxy is set in profile.

---
 src/openvpn/init.c | 6 ++++++
 1 file changed, 6 insertions(+)
src/openvpn/init.c +6 -0
index b500d354..7c428307 100644
@@ -223,6 +223,12 @@ management_callback_proxy_cmd(void *arg, const char **p)
     }
     else if (p[2] && p[3])
     {
+        if (!c->options.tuntap_options.disable_dco)
+        {
+            msg(M_INFO, "Proxy set via management, disabling Data Channel Offload.");
+            c->options.tuntap_options.disable_dco = true;
+        }
+
         if (streq(p[1], "HTTP"))
         {
             struct http_proxy_options *ho;
Signature · 1 line
2.38.1.windows.1
#1 lore raw

PATCH v2 1/1 Disabe DCO if proxy is set via management

From: Lev Stipakov <[email protected]...>

DCO doesn't support proxy and we already disable DCO is proxy is set in profile.

---
v2: use dco_enabled() helper function

 src/openvpn/init.c | 6 ++++++
 1 file changed, 6 insertions(+)
src/openvpn/init.c +6 -0
index b500d354..622239f6 100644
@@ -223,6 +223,12 @@ management_callback_proxy_cmd(void *arg, const char **p)
     }
     else if (p[2] && p[3])
     {
+        if (dco_enabled(&c->options))
+        {
+            msg(M_INFO, "Proxy set via management, disabling Data Channel Offload.");
+            c->options.tuntap_options.disable_dco = true;
+        }
+
         if (streq(p[1], "HTTP"))
         {
             struct http_proxy_options *ho;
Signature · 1 line
2.38.1.windows.1
Acked-by on v2 1/1
#2 lore raw

Hi,

Quoted 6 lines · Lev Stipakov

From: Lev Stipakov <[email protected]...>

DCO doesn't support proxy and we already disable DCO is proxy is set in profile.

Quoted 23 lines

---
v2: use dco_enabled() helper function

  src/openvpn/init.c | 6 ++++++
  1 file changed, 6 insertions(+)
src/openvpn/init.c +6 -0
index b500d354..622239f6 100644
@@ -223,6 +223,12 @@ management_callback_proxy_cmd(void *arg, const char **p)
      }
      else if (p[2] && p[3])
      {
+        if (dco_enabled(&c->options))
+        {
+            msg(M_INFO, "Proxy set via management, disabling Data Channel Offload.");
+            c->options.tuntap_options.disable_dco = true;
+        }
+
          if (streq(p[1], "HTTP"))
          {
              struct http_proxy_options *ho;
Signature · 1 line
Antonio Quartulli
#3 lore raw

[Openvpn-devel] [PATCH applied] Re: Disable DCO if proxy is set via management

In reply to Lev Stipakov

Patch looks reasonable.

Not tested beyond "does it compile on Linux and MinGW?".

Your patch has been applied to the master and release/2.6 branch.

commit 45a1cb2ad85a50feded10dad706132bd8a7f6133 (master) commit 42cda5ad9e8542a48385eb2e0b7807773aa341f1 (release/2.6)

Author: Lev Stipakov
Date:   Mon Feb 20 11:06:01 2023 +0200
     Disable DCO if proxy is set via management

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg26287.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering