Permalink
Browse files

m_dnsbl Fix connecting users timeouting when a dnsbl result is in the…

… dns cache

Fixes #431 reported by @killerrabbit
  • Loading branch information...
1 parent af496f1 commit 3e6a05f4fadaa8b8b4ab6c8a970e84e63a9f27c2 @attilamolnar attilamolnar committed Mar 2, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/modules/m_dnsbl.cpp
View
@@ -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)

0 comments on commit 3e6a05f

Please sign in to comment.