From: Lev Stipakov Date: Tue, 1 Mar 2022 13:50:54 +0000 (+0200) Subject: Fix incorrect default mssfix value in server mode X-Git-Tag: v2.6_beta1~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a50f5f633ca179214d102806c582de9a076ec8a;p=thirdparty%2Fopenvpn.git 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 --- 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) {