diff options
author | Martin Willi <martin@revosec.ch> | 2012-11-12 15:48:48 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-11-29 10:22:51 +0100 |
commit | 47f35b46a14ee73edf9e42bc5bb113b85150292a (patch) | |
tree | 2b5660befd4e57bb3a5ae0db5790cbd76d98a9ec /src | |
parent | f5fe52bf9ad16e82f02a47fc43d37762f9ce7a59 (diff) | |
download | strongswan-47f35b46a14ee73edf9e42bc5bb113b85150292a.tar.bz2 strongswan-47f35b46a14ee73edf9e42bc5bb113b85150292a.tar.xz |
host_create_from_dns() tries a numeric conversion before asking resolver
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); |