From 47f35b46a14ee73edf9e42bc5bb113b85150292a Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 12 Nov 2012 15:48:48 +0100 Subject: [PATCH] host_create_from_dns() tries a numeric conversion before asking resolver --- src/libstrongswan/networking/host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);