0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

ircd::server: Skip DNS resolution on IP literals.

This commit is contained in:
Jason Volk 2019-03-24 20:47:15 -07:00
parent 9d552cd88a
commit d7631dc39b

View file

@ -975,6 +975,16 @@ ircd::server::peer::resolve(const hostport &hostport,
"Unsupported DNS question type '%u' for resolve", opts.qtype "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 auto handler
{ {
opts.qtype == 33? opts.qtype == 33?