X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dnsbl.cpp;h=732717ff3dc08ea7704f956f41a0e7961c45d94f;hb=12a47e788b3eba8e395abdd46c2dc91692b9b292;hp=752a0d7a5997a14ba39845295f7cf6bf3886612b;hpb=e191f0ed6cdca421407ebc67c28fafabc6cc63f7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 752a0d7a5..732717ff3 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -35,7 +35,7 @@ class DNSBLConfEntry : public refcountbase EnumBanaction banaction; EnumType type; long duration; - int bitmask; + unsigned int bitmask; unsigned char records[256]; unsigned long stats_hits, stats_misses; DNSBLConfEntry(): type(A_BITMASK),duration(86400),bitmask(0),stats_hits(0), stats_misses(0) {} @@ -88,7 +88,7 @@ class DNSBLResolver : public DNS::Request bool match = false; in_addr resultip; - inet_aton(ans_record->rdata.c_str(), &resultip); + inet_pton(AF_INET, ans_record->rdata.c_str(), &resultip); switch (ConfEntry->type) { @@ -279,7 +279,7 @@ class ModuleDNSBL : public Module if (tag->getString("type") == "bitmask") { e->type = DNSBLConfEntry::A_BITMASK; - e->bitmask = tag->getInt("bitmask"); + e->bitmask = tag->getInt("bitmask", 0, 0, UINT_MAX); } else {