From: Martin Willi Date: Mon, 12 Nov 2012 14:48:48 +0000 (+0100) Subject: host_create_from_dns() tries a numeric conversion before asking resolver X-Git-Tag: 5.0.2dr4~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47f35b46a14ee73edf9e42bc5bb113b85150292a;p=thirdparty%2Fstrongswan.git host_create_from_dns() tries a numeric conversion before asking resolver --- diff --git a/src/libstrongswan/networking/host.c b/src/libstrongswan/networking/host.c index 160a6ec1b5..3270f0c85d 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);