From: Ruben d'Arco Date: Fri, 15 Feb 2013 12:33:20 +0000 (+0100) Subject: Fix issue with case sensative search for ENT X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdf983eb5b494034ccb254856f2951718a6cdfd2;p=pdns Fix issue with case sensative search for ENT --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc old mode 100644 new mode 100755 index fc8074900..e113e0c55 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -86,6 +86,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * set delnonterm, insnonterm; // used to (at the end) fix ENT records. string rrLabel = stripDot(rr->d_label); + rrLabel = toLower(rrLabel); QType rrType = QType(rr->d_type); if (rr->d_class == QClass::IN) { // 3.4.2.2 QClass::IN means insert or update @@ -233,7 +234,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * // Delete records - section 3.4.2.3 and 3.4.2.4 with the exception of the 'always leave 1 NS rule' as that's handled by // the code that calls this performUpdate(). if ((rr->d_class == QClass::ANY || rr->d_class == QClass::NONE) && rrType != QType::SOA) { // never delete a SOA. - DLOG(L<d_class<<"; rrType: "<d_class<<"; rrType: "<backend->lookup(rrType, rrLabel); while(di->backend->get(rec)) { if (rr->d_class == QClass::ANY) { // 3.4.2.3 @@ -278,7 +279,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * // Fix ENT records. // We must check if we have a record below the current level and if we removed the 'last' record // on that level. If so, we must insert an ENT record. - // We take extra care here to not 'include' the record that we just deleted. Some backends will still return it. + // We take extra care here to not 'include' the record that we just deleted. Some backends will still return it as they only reload on a commit. bool foundDeeper = false, foundOther = false; di->backend->listSubZone(rrLabel, di->id); while (di->backend->get(rec)) {