]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dco: disable DCO if --allow-compress yes/asym was specified
authorAntonio Quartulli <a@unstable.cc>
Sun, 7 Aug 2022 09:53:29 +0000 (11:53 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 7 Aug 2022 10:18:13 +0000 (12:18 +0200)
Allowing compression means that we may accept a pushable compress
setting.
This scenario can't work with DCO therefore disable it when compression
is allowed.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220807095329.28819-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24834.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco.c

index 09855643c9c994d19fe807a86142442374c30443..c23ac0f7871391e813d29cd29f9573a60bbc392e 100644 (file)
@@ -339,9 +339,11 @@ dco_check_option_conflict(int msglevel, const struct options *o)
     }
 
 #if defined(USE_COMP)
-    if (o->comp.alg != COMP_ALG_UNDEF)
+    if (o->comp.alg != COMP_ALG_UNDEF
+        || o->comp.flags & COMP_F_ALLOW_ASYM
+        || o->comp.flags & COMP_F_ALLOW_COMPRESS)
     {
-        msg(msglevel, "Note: Using compression disables data channel offload.");
+        msg(msglevel, "Note: '--allow-compression' is not set to 'no', disabling data channel offload.");
 
         if (o->mode == MODE_SERVER && !(o->comp.flags & COMP_F_MIGRATE))
         {