diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-03-02 21:36:15 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-03-11 20:48:58 +0100 |
commit | 3e6a05f4fadaa8b8b4ab6c8a970e84e63a9f27c2 (patch) | |
tree | 2a9a016206fc9b5e27158202e835fca9ebfbd0d9 /src | |
parent | af496f1fea3f9a20607cb6d6ae0603971ba2400d (diff) |
m_dnsbl Fix connecting users timeouting when a dnsbl result is in the dns cache
Fixes #431 reported by @killerrabbit
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 0f4f4c335..5e02dd0a5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -375,6 +375,8 @@ class ModuleDNSBL : public Module snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a); reversedip = std::string(reversedipbuf); + countExt.set(user, DNSBLConfEntries.size()); + // For each DNSBL, we will run through this lookup unsigned int i = 0; while (i < DNSBLConfEntries.size()) @@ -386,9 +388,10 @@ class ModuleDNSBL : public Module bool cached; DNSBLResolver *r = new DNSBLResolver(this, nameExt, countExt, hostname, user, DNSBLConfEntries[i], cached); ServerInstance->AddResolver(r, cached); + if (user->quitting) + break; i++; } - countExt.set(user, i); } ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass) |