summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_dnsbl.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 6712e2674..57a780ff2 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -84,7 +84,10 @@ class DNSBLResolver : public DNS::Request
/* Check the user still exists */
LocalUser* them = IS_LOCAL(ServerInstance->FindUUID(theiruid));
if (!them || them->client_sa != theirsa)
+ {
+ ConfEntry->stats_misses++;
return;
+ }
int i = countExt.get(them);
if (i)
@@ -242,6 +245,20 @@ class DNSBLResolver : public DNS::Request
void OnError(const DNS::Query *q) CXX11_OVERRIDE
{
+ bool is_miss = true;
+ switch (q->error)
+ {
+ case DNS::ERROR_NO_RECORDS:
+ case DNS::ERROR_DOMAIN_NOT_FOUND:
+ ConfEntry->stats_misses++;
+ break;
+
+ default:
+ ConfEntry->stats_errors++;
+ is_miss = false;
+ break;
+ }
+
LocalUser* them = IS_LOCAL(ServerInstance->FindUUID(theiruid));
if (!them || them->client_sa != theirsa)
return;
@@ -250,13 +267,9 @@ class DNSBLResolver : public DNS::Request
if (i)
countExt.set(them, i - 1);
- if (q->error == DNS::ERROR_NO_RECORDS || q->error == DNS::ERROR_DOMAIN_NOT_FOUND)
- {
- ConfEntry->stats_misses++;
+ if (is_miss)
return;
- }
- ConfEntry->stats_errors++;
ServerInstance->SNO->WriteGlobalSno('d', "An error occurred whilst checking whether %s (%s) is on the '%s' DNS blacklist: %s",
them->GetFullRealHost().c_str(), them->GetIPString().c_str(), ConfEntry->name.c_str(), this->manager->GetErrorStr(q->error).c_str());
}