This should fix the issue of some DNSBLs being slower than others.
domain="torexit.dan.me.uk"
type="record"
records="100"
domain="torexit.dan.me.uk"
type="record"
records="100"
action="zline"
duration="7d"
reason="Tor exit nodes are not allowed on this network. See https://metrics.torproject.org/rs.html#search/%ip% for more information.">
action="zline"
duration="7d"
reason="Tor exit nodes are not allowed on this network. See https://metrics.torproject.org/rs.html#search/%ip% for more information.">
/* Creator of this request */
Module* const creator;
/* Creator of this request */
Module* const creator;
- Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true)
- : Timer(ServerInstance->Config->ConfValue("dns")->getDuration("timeout", 5, 1))
+ Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true, unsigned int timeout = 0)
+ : Timer(timeout ? timeout : ServerInstance->Config->ConfValue("dns")->getDuration("timeout", 5, 1))
, manager(mgr)
, question(addr, qt)
, use_cache(usecache)
, manager(mgr)
, question(addr, qt)
, use_cache(usecache)
EnumType type;
unsigned long duration;
unsigned int bitmask;
EnumType type;
unsigned long duration;
unsigned int bitmask;
unsigned char records[256];
unsigned long stats_hits, stats_misses, stats_errors;
DNSBLConfEntry()
: type(A_BITMASK)
, duration(86400)
, bitmask(0)
unsigned char records[256];
unsigned long stats_hits, stats_misses, stats_errors;
DNSBLConfEntry()
: type(A_BITMASK)
, duration(86400)
, bitmask(0)
, stats_hits(0)
, stats_misses(0)
, stats_errors(0)
, stats_hits(0)
, stats_misses(0)
, stats_errors(0)
public:
DNSBLResolver(DNS::Manager *mgr, Module *me, LocalStringExt& match, LocalIntExt& ctr, const std::string &hostname, LocalUser* u, reference<DNSBLConfEntry> conf)
public:
DNSBLResolver(DNS::Manager *mgr, Module *me, LocalStringExt& match, LocalIntExt& ctr, const std::string &hostname, LocalUser* u, reference<DNSBLConfEntry> conf)
- : DNS::Request(mgr, me, hostname, DNS::QUERY_A, true)
+ : DNS::Request(mgr, me, hostname, DNS::QUERY_A, true, conf->timeout)
, theirsa(u->client_sa)
, theiruid(u->uuid)
, nameExt(match)
, theirsa(u->client_sa)
, theiruid(u->uuid)
, nameExt(match)
e->host = tag->getString("host");
e->reason = tag->getString("reason", "Your IP has been blacklisted.", 1);
e->domain = tag->getString("domain");
e->host = tag->getString("host");
e->reason = tag->getString("reason", "Your IP has been blacklisted.", 1);
e->domain = tag->getString("domain");
+ e->timeout = tag->getDuration("timeout", 0);
if (stdalgo::string::equalsci(tag->getString("type"), "bitmask"))
{
if (stdalgo::string::equalsci(tag->getString("type"), "bitmask"))
{