summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 9122486fc..134406e02 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -259,7 +259,7 @@ class ModuleDNSBL : public Module
}
e->banaction = str2banaction(MyConf->ReadValue("dnsbl", "action", i));
- e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i));
+ e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", "60", i));
/* Use portparser for record replies */
@@ -280,6 +280,10 @@ class ModuleDNSBL : public Module
{
ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(#%d): Invalid banaction", i);
}
+ else if (e->duration <= 0)
+ {
+ ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(#%d): Invalid duration", i);
+ }
else
{
if (e->reason.empty())