summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-07-09 22:36:40 +0100
committerPeter Powell <petpow@saberuk.com>2017-07-09 22:45:00 +0100
commitc0aba5b728b0a921d95ec120aa638dab1520b42f (patch)
tree5470b2e12cc40ba8ea5cafe36fc254c73192cb48 /src/modules/m_dnsbl.cpp
parente97ee390cf1a3f5e897aed85d62e29a34c4632f9 (diff)
parentb7facc2474ff5fb229c66ed130ed67207620f55d (diff)
Merge v2.0.23 and v2.0.24 into master.
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 73ecd02a6..7b0f06191 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -70,6 +70,14 @@ class DNSBLResolver : public DNS::Request
if (!ans_record)
return;
+ // All replies should be in 127.0.0.0/8
+ if (ans_record->rdata.compare(0, 4, "127.") != 0)
+ {
+ ServerInstance->SNO->WriteGlobalSno('a', "DNSBL: %s returned address outside of acceptable subnet 127.0.0.0/8: %s", ConfEntry->domain.c_str(), ans_record->rdata.c_str());
+ ConfEntry->stats_misses++;
+ return;
+ }
+
int i = countExt.get(them);
if (i)
countExt.set(them, i - 1);