From 0881012f25160a60e79841d2c19cfc137d661d8d Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 14 Oct 2014 10:27:06 +0300 Subject: [PATCH] Use transaction when updating serial --- pdns/pdnssec.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 24342e2c23..f486f2c520 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -612,7 +612,10 @@ int increaseSerial(const string& zone, DNSSECKeeper &dk) } rrs[0].content = serializeSOAData(sd); + sd.db->startTransaction("", -1); + if (! sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, rrs)) { + sd.db->abortTransaction(); cerr<<"Backend did not replace SOA record. Backend might not support this operation."<commitTransaction(); + cout<<"SOA serial for zone "<