]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Implement '--compress migrate' to migrate to non-compression setup
authorArne Schwabe <arne@rfc2549.org>
Wed, 24 Mar 2021 22:08:53 +0000 (23:08 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 2 Apr 2021 12:49:39 +0000 (14:49 +0200)
commit8fa8a17528c001abc7d5f45e9c2ffa3ed2f6af43
treee1a4b0d3ac8b44f84bd86dbb1be689c3398407b7
parent72e1ecb5b5d282c591cc32bbd378efbebfb03918
Implement '--compress migrate' to migrate to non-compression setup

This option allow migration to a non compression server config while
still retraining compatibility with client that have a compression
setting in their config.

For existing setups that used to have comp-lzo no or another
compression setting in their configs it is a difficult to migrate to
a setup without compression without replacing all client configs at
once especially if OpenVPN 2.3 or earlier clients are in the mix that
do not support pushing stub-v2. Even with OpenVPN 2.4 and later clients
that support pushing this is not a satisfying solution as the clients
log occ mismatches and the "push stub-v2" needs to be in the server
config "forever".

If the new migrate option to compress is set and  a client is detected
that indicates that compression is used (via OCC), the server will
automatically add ``--push compress stub-v2`` to the client specific
configuration if stub-v2 is supported by the client and otherwise
switch to ``comp-lzo no`` and add ``--push comp-lzo`` to the client
specific configuration.

Patch v2: better commit message/man page, add USE_COMP ifdefs, various
          style fixes

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210324220853.31246-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21801.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/man-sections/protocol-options.rst
src/openvpn/comp.h
src/openvpn/multi.c
src/openvpn/options.c
src/openvpn/ssl.c
src/openvpn/ssl_common.h
src/openvpn/ssl_util.c
src/openvpn/ssl_util.h
tests/unit_tests/openvpn/Makefile.am
tests/unit_tests/openvpn/test_misc.c [new file with mode: 0644]