Skip to content

Commit 4ff746a

Browse files
schwabecron2
authored andcommitted
Fix dco with null cipher being enabled without auth none
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>
1 parent 864aab8 commit 4ff746a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/openvpn/dco.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,18 @@ dco_check_option(msglvl_t msglevel, const struct options *o)
474474
gc_free(&gc);
475475
return false;
476476
}
477+
/* FreeBSD supports none as cipher type but requires auth none to be
478+
* be also enabled */
479+
if (strcmp(token, "none") == 0 && strcmp(o->authname, "none") != 0)
480+
{
481+
msg(msglevel,
482+
"Note: cipher '%s' in --data-ciphers is only supported "
483+
"with --auth=none by ovpn-dco, disabling data channel "
484+
"offload.",
485+
token);
486+
gc_free(&gc);
487+
return false;
488+
}
477489
}
478490
gc_free(&gc);
479491

0 commit comments

Comments
 (0)