From: Antonio Quartulli Date: Fri, 5 Aug 2022 17:13:25 +0200 Message-Id: <20220805151325.14021-1-a@...2181...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH] dco: disable DCO if --allow-compress yes/asym was specified List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli 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 --- src/openvpn/dco.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index c40fe96f..31f8737f 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -352,9 +352,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: Allowing or using compression disables data channel offload."); if (o->mode == MODE_SERVER && !(o->comp.flags & COMP_F_MIGRATE)) { -- 2.35.1