]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix fatal error at switching remotes (#629)
authorVladislav Grishenko <themiron@yandex-team.ru>
Wed, 16 Sep 2020 14:17:55 +0000 (19:17 +0500)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Sep 2020 08:35:18 +0000 (10:35 +0200)
commit6554025a422d3d7e5465bcbfad34fa3e196b53b0
tree4f732ffaa11afbed6d7a619c64cece59db638866
parent55f4fe3a0d04b35f0e817c5a34246d9bda40e936
Fix fatal error at switching remotes (#629)

If remote server has been resolved to multiple addresses, at
least one connection attempt has been made and connection to
the last address was skipped by management - resolved earlier
link socket addrinfo objects will not be cleared neither on
instance close nor in the next connection entry loop.
This causes fatal error assert:

    >REMOTE:openvpn.net,1194,udp
    remote ACCEPT
    SUCCESS: remote command succeeded
    >REMOTE:openvpn.net,1194,udp
    remote SKIP
    SUCCESS: remote command succeeded
    >FATAL:Assertion failed at init.c:504
(c->c1.link_socket_addr.current_remote == NULL)

Fix this behaviour by cleaning stale addrinfo objects.

v2: better comment placement and too long length fix

Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20200916141755.1923-1-themiron@yandex-team.ru>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21019.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 3ad86c2534a92af137809b6d446d570193e6d01f)
src/openvpn/init.c