} catch (...) {
return false;
}
+ string type=d_result[0][5];
+ di.account=d_result[0][6];
+ di.kind = DomainInfo::stringToKind(type);
+
vector<string> masters;
stringtok(masters, d_result[0][2], " ,\t");
for(const auto& m : masters)
di.masters.emplace_back(m, 53);
di.last_check=pdns_stou(d_result[0][3]);
di.notified_serial = pdns_stou(d_result[0][4]);
- string type=d_result[0][5];
- di.account=d_result[0][6];
di.backend=this;
di.serial = 0;
}
}
- di.kind = DomainInfo::stringToKind(type);
-
return true;
}
} catch (...) {
continue;
}
+
+ if (pdns_iequals(row[3], "MASTER"))
+ di.kind = DomainInfo::Master;
+ else if (pdns_iequals(row[3], "SLAVE"))
+ di.kind = DomainInfo::Slave;
+ else
+ di.kind = DomainInfo::Native;
if (!row[4].empty()) {
vector<string> masters;
di.last_check = pdns_stou(row[6]);
di.account = row[7];
- if (pdns_iequals(row[3], "MASTER"))
- di.kind = DomainInfo::Master;
- else if (pdns_iequals(row[3], "SLAVE"))
- di.kind = DomainInfo::Slave;
- else
- di.kind = DomainInfo::Native;
-
di.backend = this;
domains->push_back(di);
int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vector<DNSResourceRecord>* suppliedrecords=0)
{
+ uint64_t numerrors=0, numwarnings=0;
+
+ DomainInfo di;
+ try {
+ B.getDomainInfo(zone, di);
+ } catch(const PDNSException &e) {
+ if (di.kind == DomainInfo::Slave) {
+ cout<<"[Error] non-IP address for masters: "<<e.reason<<endl;
+ numerrors++;
+ }
+ }
+
SOAData sd;
if(!B.getSOAUncached(zone, sd)) {
cout<<"[Error] No SOA record present, or active, in zone '"<<zone<<"'"<<endl;
- cout<<"Checked 0 records of '"<<zone<<"', 1 errors, 0 warnings."<<endl;
+ numerrors++;
+ cout<<"Checked 0 records of '"<<zone<<"', "<<numerrors<<" errors, 0 warnings."<<endl;
return 1;
}
vector<string> checkKeyErrors;
bool validKeys=dk.checkKeys(zone, &checkKeyErrors);
- uint64_t numerrors=0, numwarnings=0;
-
if (haveNSEC3) {
if(isSecure && zone.wirelength() > 222) {
numerrors++;