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:
parent
9d552cd88a
commit
d7631dc39b
1 changed files with 10 additions and 0 deletions
|
@ -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?
|
||||||
|
|
Loading…
Reference in a new issue