From: Antonio Quartulli Date: Sun, 7 Aug 2022 09:53:29 +0000 (+0200) Subject: dco: disable DCO if --allow-compress yes/asym was specified X-Git-Tag: v2.6_beta1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c984d0b17056f87cd580260edd2e89874c601566;p=thirdparty%2Fopenvpn.git dco: disable DCO if --allow-compress yes/asym was specified 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 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 09855643c..c23ac0f78 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -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)) {