diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/utils/host.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index bc31f22e0..bc85942ef 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -461,6 +461,11 @@ host_t *host_create_from_dns(char *string, int af, u_int16_t port) char buf[512]; int err, ret; + if (strchr(string, ':')) + { /* gethostbyname does not like IPv6 addresses, fallback */ + return host_create_from_string(string, port); + } + if (af) { ret = gethostbyname2_r(string, af, &host, buf, sizeof(buf), &ptr, &err); |