Fix incorrect default mssfix value in server mode
PATCH 1/1 Fix incorrect default mssfix value in server mode
From: Lev Stipakov <[email protected]...>
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.
--- src/openvpn/multi.c | 1 + 1 file changed, 1 insertion(+)
src/openvpn/multi.c +1 -0
@@ -1772,6 +1772,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; }else if (dco_enabled (o)) {
Signature · 1 line
2.23.0.windows.1
Am 01.03.22 um 14:50 schrieb Lev Stipakov:
Quoted 5 lines
From: Lev Stipakov <[email protected]...>
When calculating default mssfix, we take into account protocol overhead, which usually includes 3 bytes peer-id.
Quoted 7 lines
Peer-id usage is indicated by
options->use_peer_idflag. 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.cwhen calculating tunnel-specific options.
This fixes the issue at hand. It would be better to refactor the whole peerid in use signalling eventually but this is good enough for now.
Arne
Thanks for the band-aid :-) - I have not tested this, trusting you and Arne to have sufficiently tested this in the context of Win-DCO MSS handling (as a side note, patches against a tree with "dco_enabled(o)" in their context do not fit "master without DCO" easily ;-) ).
Your patch has been applied to the master branch.
commit 7a50f5f633ca179214d102806c582de9a076ec8a
Author: Lev Stipakov Date: Tue Mar 1 15:50:54 2022 +0200
Fix incorrect default mssfix value in server mode
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg23896.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering