mirror of
https://github.com/anope/anope.git
synced 2026-07-09 00:03:14 +02:00
dns: set error to REFUSED when there are no answers
This commit is contained in:
@@ -854,6 +854,9 @@ class MyManager : public Manager, public Timer
|
||||
}
|
||||
}
|
||||
|
||||
if (packet->answers.empty() && packet->authorities.empty() && packet->additional.empty() && packet->error == ERROR_NONE)
|
||||
packet->error = ERROR_REFUSED; // usually safe, won't cause an NXDOMAIN to get cached
|
||||
|
||||
s->Reply(packet);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user