From 0d46c4963ae47581eadd94dbd2190c66086b9ecb Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Tue, 24 May 2022 12:19:16 +0300 Subject: [PATCH] Set o->use_peer_id flag for p2p mode 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 Acked-by: Antonio Quartulli Message-Id: <20220524091916.145-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24430.html Signed-off-by: Gert Doering --- src/openvpn/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 6cdcef628..638fd10c8 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.47.3