From: Lev Stipakov <l...@openvpn.net>

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 <l...@openvpn.net>
---
 src/openvpn/multi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index d8d44f96..ea19c539 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -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))
     {
-- 
2.23.0.windows.1



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to