mirror of
https://github.com/anope/anope.git
synced 2026-07-03 11:13:13 +02:00
Don't attempt to connect to the uplink if given invalid hostnames
This commit is contained in:
+5
-1
@@ -221,6 +221,11 @@ inline DNSRecord::DNSRecord(const Anope::string &n) : name(n)
|
||||
this->created = Anope::CurTime;
|
||||
}
|
||||
|
||||
DNSRecord::operator bool() const
|
||||
{
|
||||
return !this->result.empty();
|
||||
}
|
||||
|
||||
DNSSocket::DNSSocket() : ConnectionSocket(false, SOCK_DGRAM)
|
||||
{
|
||||
}
|
||||
@@ -613,7 +618,6 @@ DNSRecord DNSManager::BlockingQuery(const Anope::string &mask, QueryType qt)
|
||||
DNSRecord result(mask);
|
||||
addrinfo *addrresult, hints;
|
||||
|
||||
result.result = mask;
|
||||
result.type = qt;
|
||||
|
||||
int type = AF_UNSPEC;
|
||||
|
||||
Reference in New Issue
Block a user