]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix incorrect default mssfix value in server mode
authorLev Stipakov <lev@openvpn.net>
Tue, 1 Mar 2022 13:50:54 +0000 (15:50 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Mar 2022 12:51:24 +0000 (13:51 +0100)
When calculating default mssfix, we take into account
protocol overhead, which usually includes 3 bytes peer-id.

Peer-id usage is indicated by options->use_peer_id flag.
In client mode it is set when applying pushed options.
In server mode  it is not set and as a result mssfix value
is 3 bytes off.

Fix by setting this flag in multi.c when calculating
tunnel-specific options.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20220301135054.277-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23896.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/multi.c

index 74e8ef3c3093ce318dc90ee9c93f162080b62187..8fc74321820855221debc286ac156daad78bd1e7 100644 (file)
@@ -1763,6 +1763,7 @@ multi_client_set_protocol_options(struct context *c)
     if (proto & IV_PROTO_DATA_V2)
     {
         tls_multi->use_peer_id = true;
+        o->use_peer_id = true;
     }
     if (proto & IV_PROTO_REQUEST_PUSH)
     {