diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/networking/host.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstrongswan/networking/host.c b/src/libstrongswan/networking/host.c index 160a6ec1b..3270f0c85 100644 --- a/src/libstrongswan/networking/host.c +++ b/src/libstrongswan/networking/host.c @@ -450,7 +450,11 @@ host_t *host_create_from_dns(char *string, int af, u_int16_t port) { host_t *this; - this = lib->hosts->resolve(lib->hosts, string, af); + this = host_create_from_string_and_family(string, af, port); + if (!this) + { + this = lib->hosts->resolve(lib->hosts, string, af); + } if (this) { this->set_port(this, port); |