]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add 'allow-compression stub-only' internally for DCO
authorArne Schwabe <arne@rfc2549.org>
Fri, 24 Mar 2023 10:06:40 +0000 (11:06 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 24 Mar 2023 10:24:17 +0000 (11:24 +0100)
commit4117d950788eebfaf6c9b5dde278e3a81b9e805d
tree414f8e9c059c1da90284070df2e1c8e08680bcfa
parente86bc8b2967484afdb1e96efddb8d91185c4cc2c
Add 'allow-compression stub-only' internally for DCO

This changes the "no" setting of allow-compression to also refuse framing
if DCO is active.  This is important for our DCO implementations as these
do not implement framing.

This behaviour surfaced when a commercial VPN provider was pushing
"comp-lzo no" to a client with DCO. While we are technically at fault here
for announcing comp-lzo no support by announcing IV_LZO_STUB=1, the
VPN provider continues to push "comp-lzo no" even in absense of that
flag.

As the new default we default to 'allow-compression no' if DCO is
enabled and to 'allow-compression stub' otherwise.

This will now also bail out if the server pushes a compression setting that
we do not support as mismatching compression is almost never a working
connection. In the case of lz4-v2 and lzo-v2 you might have a connection
that works mostly but some packets will be dropped since they compressed
which is not desirable either since it becomes very hard to debug.

Patch v2: bail out if server pushes an unsupported method. Also include this
          bail out logic when OpenVPN is compiled without compression support.

Patch v3: always parse all compression option and move logic to check method
Patch v4: fix for not setting correct default for non-dco

Change-Id: Ibd0c77af24e2214b3055d585dc23a4b06dccd414
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230324100640.1340535-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26509.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/man-sections/protocol-options.rst
src/openvpn/comp.c
src/openvpn/comp.h
src/openvpn/options.c