mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 12:02:28 +02:00
Fix 'compress migrate' for 2.2 clients.
Commit 8fa8a17528
introduces "compress migrate" to move old clients
that have "compress" or "comp-lzo" in their config towards a connection
without compression. This is done by looking at incoming OCC strings
to see if the client has compression enabled, and at incoming IV_
strings to see whether it can do "compress stub-v2" or needs to be sent
"comp-lzo no".
That check fails for 2.2 clients that do not send *any* peer-info by
default, so the server will not push back any "disable compression"
command. It works if the client connects with "--push-peer-info".
Fix: turn around the order of checks, treat "no peer_info" the same
as "peer_info does not contain IV_COMP_STUBv2".
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20210402134529.27866-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21974.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
8fa8a17528
commit
aba8776e67
@ -2485,14 +2485,9 @@ multi_client_connect_compress_migrate(struct multi_context *m,
|
|||||||
struct options *o = &mi->context.options;
|
struct options *o = &mi->context.options;
|
||||||
const char *const peer_info = mi->context.c2.tls_multi->peer_info;
|
const char *const peer_info = mi->context.c2.tls_multi->peer_info;
|
||||||
|
|
||||||
if (!peer_info)
|
|
||||||
{
|
|
||||||
return CC_RET_SUCCEEDED;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o->comp.flags & COMP_F_MIGRATE && mi->context.c2.tls_multi->remote_usescomp)
|
if (o->comp.flags & COMP_F_MIGRATE && mi->context.c2.tls_multi->remote_usescomp)
|
||||||
{
|
{
|
||||||
if(strstr(peer_info, "IV_COMP_STUBv2=1"))
|
if(peer_info && strstr(peer_info, "IV_COMP_STUBv2=1"))
|
||||||
{
|
{
|
||||||
push_option(o, "compress stub-v2", M_USAGE);
|
push_option(o, "compress stub-v2", M_USAGE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user