From: Ruben d'Arco Date: Sun, 3 Mar 2013 07:14:00 +0000 (+0100) Subject: fix auth and ordername after replacing a record X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e42cac2dc0d6bdb101e9ffe405550a37fbc297f;p=thirdparty%2Fpdns.git fix auth and ordername after replacing a record The replaceRRSet does not keep the auth & ordername fields. --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 87c6c4c4ae..75665b4e30 100755 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -149,7 +149,31 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * L<d_iterations, ns3pr->d_salt, rrLabel))); + + di->backend->updateDNSSECOrderAndAuthAbsolute(di->id, rrLabel, hashed, auth); + if(!auth || rrType == QType::DS) { + di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "NS"); + di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "A"); + di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "AAAA"); + } + + } else { // NSEC + di->backend->updateDNSSECOrderAndAuth(di->id, di->zone, rrLabel, auth); + if(!auth || rrType == QType::DS) { + di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "A"); + di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "AAAA"); + } + } + + } // if (foundRecord) // If we haven't found a record that matches, we must add it. if (! foundRecord) {