{
std::lock_guard<std::mutex> guard(g_soas_mutex);
g_soas[domain] = newInfo;
+ g_stats.setSOASerial(domain, newInfo->soa->d_st.serial);
+ // FIXME: also report zone size?
}
- void updateThread(const string& workdir, const uint16_t& keep, const uint16_t& axfrTimeout, const uint16_t& soaRetry) {
+ void updateThread(const string& workdir, const uint16_t& keep, const uint16_t& axfrTimeout, const uint16_t& soaRetry, const uint32_t axfrMaxRecords) {
setThreadName("ixfrdist/update");
std::map<DNSName, time_t> lastCheck;
nrecords++;
if (dr.d_type == QType::SOA) {
soa = getRR<SOARecordContent>(dr);
+ soaTTL = dr.d_ttl;
}
}
+ if (axfrMaxRecords != 0 && nrecords > axfrMaxRecords) {
+ throw PDNSException("Received more than " + std::to_string(axfrMaxRecords) + " records in AXFR, aborted");
+ }
axfr_now = time(nullptr);
if (axfr_now - t_start > axfrTimeout) {
+ g_stats.incrementAXFRFailures(domain);
throw PDNSException("Total AXFR time exceeded!");
}
}