If remote server has been resolved to multiple addresses, at least one connection attemt 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 addinfo objects. Signed-off-by: Vladislav Grishenko <themi...@yandex-team.ru> --- src/openvpn/init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index a785934a..508270a7 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -500,6 +500,16 @@ next_connection_entry(struct context *c) */ if (!c->options.persist_remote_ip) { + if (c->c1.link_socket_addr.remote_list) + { + /* Connection entry addinfo objects might have been resolved + * earlier but the entry itself might have been skipped by + * management on the previous loop. if so, need to clear the + * addrinfo objects as close_instance does */ + clear_remote_addrlist(&c->c1.link_socket_addr, + !c->options.resolve_in_advance); + } + /* close_instance should have cleared the addrinfo objects */ ASSERT(c->c1.link_socket_addr.current_remote == NULL); ASSERT(c->c1.link_socket_addr.remote_list == NULL); -- 2.17.1 _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel