handle 0.0.0.0 string and af == AF_INET6

This commit is contained in:
Andreas Steffen
2008-11-05 00:41:46 +00:00
parent 6a8ecfc8be
commit 7c4fd176db
+1 -1
View File
@@ -461,7 +461,7 @@ host_t *host_create_from_dns(char *string, int af, u_int16_t port)
char buf[512];
int err, ret;
if (strchr(string, ':'))
if (af == AF_INET6 || strchr(string, ':'))
{ /* gethostbyname does not like IPv6 addresses, fallback */
return host_create_from_string(string, port);
}