0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 19:28:52 +02: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
};
// 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?