From a666668f064c7ff57cdebb3afceb72e1263a3ba9 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 10 Dec 2022 14:44:27 +0100 Subject: [PATCH] Disable DCO when TLS mode is not used This disables DCO in both --secret mode and when no encryption/TLS is used. Also aligns the message with the deprecation warning we have in place. Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20221210134427.1433419-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25641.html Signed-off-by: Gert Doering --- src/openvpn/dco.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 1cd698bfe..feb38cd02 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -274,9 +274,10 @@ dco_check_startup_option(int msglevel, const struct options *o) return false; } - if (o->shared_secret_file) + if (!o->tls_client && !o->tls_server) { - msg(msglevel, "--secret is set. Disabling data channel offload"); + msg(msglevel, "No tls-client or tls-server option in configuration " + "detected. Disabling data channel offload."); return false; } -- 2.47.2