Fix resolve_host_name for IPv6