From: Ruben d'Arco Date: Mon, 20 May 2013 22:08:56 +0000 (+0200) Subject: Fix deep-add-delete test again X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01166df91686ac6e758b214a028ebd17576be555;p=thirdparty%2Fpdns.git Fix deep-add-delete test again --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 0a7ecf7bd1..e62c802900 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -259,9 +259,9 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * string shorter(rrLabel); bool auth=newRec.auth; - if (shorter != di->zone) { - do{ - if (shorter == di->zone) + if ( ! pdns_iequals(di->zone, shorter)) { + while(chopOff(shorter)) { + if (pdns_iequals(shorter, di->zone)) break; bool foundShorter = false; di->backend->lookup(QType(QType::ANY), shorter); @@ -274,7 +274,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * insnonterm.insert(shorter); else break; // if we find a shorter record, we can stop searching - } while(chopOff(shorter)); + } } if(*haveNSEC3)