uint32_t calculateEditSOA(const DNSZoneRecord& rr, const string& kind);
uint32_t calculateEditSOA(const SOAData& sd, const string& kind);
bool editSOA(DNSSECKeeper& dk, const DNSName& qname, DNSPacket* dp);
-bool editSOARecord(DNSZoneRecord& rr, const string& kind, const DNSName& qname);
+bool editSOARecord(DNSZoneRecord& rr, const string& kind);
// for SOA-EDIT-DNSUPDATE/API
uint32_t calculateIncreaseSOA(SOAData sd, const string& increaseKind, const string& editKind);
bool increaseSOARecord(DNSResourceRecord& rr, const string& increaseKind, const string& editKind);
if(rr.dr.d_type == QType::SOA && rr.dr.d_name == qname) {
string kind;
dk.getSoaEdit(qname, kind);
- return editSOARecord(rr, kind, qname);
+ return editSOARecord(rr, kind);
}
}
return false;
}
-bool editSOARecord(DNSZoneRecord& rr, const string& kind, const DNSName& qname) {
+bool editSOARecord(DNSZoneRecord& rr, const string& kind) {
if(kind.empty())
return false;
auto src = getRR<SOARecordContent>(rr.dr);
DNSZoneRecord dzrsoa;
dzrsoa.auth=true;
dzrsoa.dr=DNSRecord(soa);
+
+ string kind;
+ dk.getSoaEdit(sd.qname, kind);
+ editSOARecord(dzrsoa, kind);
+
outpacket->addRecord(dzrsoa);
- editSOA(dk, sd.qname, outpacket.get());
if(securedZone) {
set<DNSName> authSet;
authSet.insert(target);
/* and terminate with yet again the SOA record */
outpacket=getFreshAXFRPacket(q);
outpacket->addRecord(dzrsoa);
- editSOA(dk, sd.qname, outpacket.get());
if(haveTSIGDetails && !tsigkeyname.empty())
outpacket->setTSIGDetails(trc, tsigkeyname, tsigsecret, trc.d_mac, true);