---
src/openvpn/socket.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index c179818..cf6e8f4 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -187,15 +187,15 @@ openvpn_getaddrinfo (unsigned int flags,
const char *fmt;
int level = 0;
- fmt = "RESOLVE: Cannot resolve host address: %s: %s";
+ fmt = "RESOLVE: Cannot resolve host address: %s:%s (%s)";
if ((flags & GETADDR_MENTION_RESOLVE_RETRY)
&& !resolve_retry_seconds)
- fmt = "RESOLVE: Cannot resolve host address: %s: %s (I would have
retried this name query if you had specified the --resolv-retry option.)";
+ fmt = "RESOLVE: Cannot resolve host address: %s:%s (%s) (I would have
retried this name query if you had specified the --resolv-retry option.)";
if (!(flags & GETADDR_RESOLVE) || status == EAI_FAIL)
{
- msg (msglevel, "RESOLVE: Cannot parse IP address: %s:%s",
- print_hostname,print_servname);
+ msg (msglevel, "RESOLVE: Cannot parse IP address: %s:%s (%s)",
+ print_hostname,print_servname, gai_strerror(status));
goto done;
}
@@ -1718,8 +1718,10 @@ phase2_socks_client (struct link_socket *sock, bool
*remote_changed,
sock->did_resolve_remote = false;
addr_zero_host(&sock->info.lsa->actual.dest);
- if (sock->info.lsa->remote_list)
+ if (sock->info.lsa->remote_list) {
freeaddrinfo(sock->info.lsa->remote_list);
+ sock->info.lsa->remote_list=NULL;
+ }
resolve_remote (sock, 1, NULL, signal_received);
}
--
1.8.3.4 (Apple Git-47)