sd.hostmaster=DNSName("hostmaster")+domain;
}
- if(!sd.serial) { // magic time!
+ if(!unmodifiedSerial && !sd.serial) { // magic time!
DLOG(L<<Logger::Warning<<"Doing SOA serial number autocalculation for "<<rr.qname<<endl);
- time_t serial;
+ uint32_t serial = 0;
if (calculateSOASerial(domain, sd, serial)) {
sd.serial = serial;
//DLOG(L<<"autocalculated soa serialnumber for "<<rr.qname<<" is "<<newest<<endl);
virtual ~DNSBackend(){};
//! fills the soadata struct with the SOA details. Returns false if there is no SOA.
- virtual bool getSOA(const DNSName &name, SOAData &soadata);
+ virtual bool getSOA(const DNSName &name, SOAData &soadata, bool unmodifiedSerial=false);
//! Calculates a SOA serial for the zone and stores it in the third argument.
- virtual bool calculateSOASerial(const DNSName& domain, const SOAData& sd, time_t& serial);
+ virtual bool calculateSOASerial(const DNSName& domain, const SOAData& sd, uint32_t& serial);
virtual bool replaceRRSet(uint32_t domain_id, const DNSName& qname, const QType& qt, const vector<DNSResourceRecord>& rrset)
{