diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/utils/host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index bc85942ef..aed27078d 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -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); } |