From 7a50f5f633ca179214d102806c582de9a076ec8a Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Tue, 1 Mar 2022 15:50:54 +0200 Subject: [PATCH] Fix incorrect default mssfix value in server mode 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 Acked-by: Arne Schwabe 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 --- src/openvpn/multi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 74e8ef3c3..8fc743218 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -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) { -- 2.47.2