comparison src/dnsbl.cpp @ 425:1b7a785610f5

hosts-ignore.conf can be used to ignore nameserver names
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Aug 2017 09:11:35 -0700
parents 91f2a127ec69
children 6f2db3d19a34
comparison
equal deleted inserted replaced
424:b1a9a6fc9aad 425:1b7a785610f5
1149 for (ns_mapper::iterator i=nameservers.ns_ip.begin(); i!=nameservers.ns_ip.end(); i++) { 1149 for (ns_mapper::iterator i=nameservers.ns_ip.begin(); i!=nameservers.ns_ip.end(); i++) {
1150 count++; 1150 count++;
1151 if ((count > limit) && (limit > 0)) return false; // too many name servers to check them all 1151 if ((count > limit) && (limit > 0)) return false; // too many name servers to check them all
1152 host = (*i).first; // a transient reference that needs to be replaced before we return it 1152 host = (*i).first; // a transient reference that needs to be replaced before we return it
1153 ip = (*i).second; 1153 ip = (*i).second;
1154
1155 // don't bother looking up nameserver names on the ignore list
1156 string_set::iterator j = ignore.find(host);
1157 if (j != ignore.end()) continue;
1158
1154 if (!ip) ip = dns_interface(priv, host, ns_t_a); 1159 if (!ip) ip = dns_interface(priv, host, ns_t_a);
1155 if (debug_syslog > 2) { 1160 if (debug_syslog > 2) {
1156 char buf[maxlen]; 1161 char buf[maxlen];
1157 if (ip) { 1162 if (ip) {
1158 char adr[sizeof "255.255.255.255 "]; 1163 char adr[sizeof "255.255.255.255 "];