From: Aki Tuomi Date: Tue, 14 Oct 2014 06:42:33 +0000 (+0300) Subject: Fix ordername for SOA record after update X-Git-Tag: auth-3.4.1~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e82a2323edefcb8eca0a7e0d6377e63d6d57c4b;p=pdns Fix ordername for SOA record after update --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 17b3f934f..24342e2c2 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -616,6 +616,28 @@ int increaseSerial(const string& zone, DNSSECKeeper &dk) cerr<<"Backend did not replace SOA record. Backend might not support this operation."<doesDNSSEC()) { + NSEC3PARAMRecordContent ns3pr; + bool narrow; + bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow); + + if(haveNSEC3) + { + if(!narrow) { + string hashed=toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rrs[0].qname)); + if(g_verbose) + cerr<<"'"< '"<< hashed <<"'"<updateDNSSECOrderAndAuthAbsolute(sd.domain_id, rrs[0].qname, hashed, 1); + } + else { + sd.db->nullifyDNSSECOrderNameAndUpdateAuth(sd.domain_id, rrs[0].qname, 1); + } + } else { + sd.db->updateDNSSECOrderAndAuth(sd.domain_id, zone, rrs[0].qname, 1); + } + } + cout<<"SOA serial for zone "<