mirror of
https://github.com/matrix-construct/construct
synced 2025-02-16 16:50: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
|
||||
};
|
||||
|
||||
// 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?
|
||||
|
|
Loading…
Add table
Reference in a new issue