]> git.ipfire.org Git - thirdparty/openvpn.git/commit
fix(ssl): init peer_id when init tls_multi
authoryatta <ytzhang01@foxmail.com>
Thu, 19 Oct 2023 17:12:13 +0000 (01:12 +0800)
committerGert Doering <gert@greenie.muc.de>
Tue, 26 Dec 2023 20:18:12 +0000 (21:18 +0100)
commit6dffbf6a2a0fdacb3509410f665a69dfa3b28cbc
tree010f345a0c5fdfd705b62aa67f4b8257fc243179
parentcfaf82d5eb62e1ed4804afa37817105e9aa4394a
fix(ssl): init peer_id when init tls_multi

When openvpn run in UDP server mode, if ssl connections reach the
max clients, the next connection would be failed in `multi_create_instance`
and the half connection will be close in `multi_close_instance`, which
may lead array `m->instances[0]` covered unexpectedly and make the
first connection interrupt, this patch fix this problem by init `peer_id`
with `MAX_PEER_ID` in `tils_multi_init`.

Signed-off-by: yatta <ytzhang01@foxmail.com
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <tencent_C49D67EAA5678D180C293706A9469EFE8307@qq.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27260.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 3e30504d86f0fe5556acc0cb8e6975c5b2277661)
src/openvpn/ssl.c