]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix deep-add-delete test again
authorRuben d'Arco <cyclops@prof-x.net>
Mon, 20 May 2013 22:08:56 +0000 (00:08 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 12 Jul 2013 15:29:37 +0000 (17:29 +0200)
pdns/rfc2136handler.cc

index 0a7ecf7bd174656be021f72ed70bc3995dfc7443..e62c802900875706bd297c6a1e87c002d1da106e 100644 (file)
@@ -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)