From d7631dc39bb8b790c0a53b4954c960ee329446d5 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 24 Mar 2019 20:47:15 -0700 Subject: [PATCH] ircd::server: Skip DNS resolution on IP literals. --- ircd/server.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ircd/server.cc b/ircd/server.cc index a04f26075..eee589734 100644 --- a/ircd/server.cc +++ b/ircd/server.cc @@ -975,6 +975,16 @@ ircd::server::peer::resolve(const hostport &hostport, "Unsupported DNS question type '%u' for resolve", opts.qtype }; + // Skip DNS resolution for IP literals + if(rfc3986::valid(std::nothrow, rfc3986::parser::ip_address, host(hostport))) + { + this->remote = {host(hostport), port(hostport)}; + open_opts.ipport = this->remote; + open_opts.hostport = hostport; + open_links(); + return; + } + auto handler { opts.qtype == 33?