]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix dco with null cipher being enabled without auth none master
authorArne Schwabe <arne@rfc2549.org>
Thu, 4 Dec 2025 13:45:16 +0000 (14:45 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 4 Dec 2025 14:58:21 +0000 (15:58 +0100)
This is a corner case and only the FreeBSD DCO module support the
none encryption but as long as it supports it, we should only
enable it when the configuration actually allows to enable it.

Change-Id: I1104044701145fa37cea857e2e0e0fcac7a2bee3
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1369
Message-Id: <20251204134521.20025-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34847.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco.c

index 7abdad35d59f82ae007d4880d8e596ccb825db89..6a1a5c9a93223cedd8bc8b53a9d0e642447ea122 100644 (file)
@@ -474,6 +474,18 @@ dco_check_option(msglvl_t msglevel, const struct options *o)
             gc_free(&gc);
             return false;
         }
+        /* FreeBSD supports none as cipher type but requires auth none to be
+         * be also enabled */
+        if (strcmp(token, "none") == 0 && strcmp(o->authname, "none") != 0)
+        {
+            msg(msglevel,
+                "Note: cipher '%s' in --data-ciphers is only supported "
+                "with --auth=none by ovpn-dco, disabling data channel "
+                "offload.",
+                token);
+            gc_free(&gc);
+            return false;
+        }
     }
     gc_free(&gc);