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

There are two flags to indicate peer-id usage, one is
in tls_multi struct and another one is in options.

For P2P mode we don't set this flag in options,
which is used in MTU calculation. As a result,
automatically calculated MSS value in P2P mode is wrong,

Fix by bring use_peer_id flag in options and tls_multi
into sync for P2P.

Signed-off-by: Lev Stipakov <l...@openvpn.net>
---
 src/openvpn/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index b0c62a85..bf01d3d6 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -2144,6 +2144,8 @@ do_deferred_p2p_ncp(struct context *c)
         return true;
     }
 
+    c->options.use_peer_id = c->c2.tls_multi->use_peer_id;
+
     struct tls_session *session = &c->c2.tls_multi->session[TM_ACTIVE];
 
     const char *ncp_cipher = get_p2p_ncp_cipher(session, 
c->c2.tls_multi->peer_info,
-- 
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