]> granicus.if.org Git - pdns/commitdiff
auth: Fix ENTs removal when "replacing" new records
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 7 May 2019 09:57:04 +0000 (11:57 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 7 May 2019 09:57:04 +0000 (11:57 +0200)
pdns/ws-auth.cc

index e3f32a5099eb93aea126e64406127e5645db37d2..bf20af53c9e549219aafa5610168890350da785b 100644 (file)
@@ -2007,8 +2007,10 @@ static void patchZone(HttpRequest* req, HttpResponse* resp) {
           di.backend->lookup(QType(QType::ANY), qname);
           DNSResourceRecord rr;
           while (di.backend->get(rr)) {
-            if (qtype.getCode() == 0) {
+            if (rr.qtype.getCode() == 0) {
               ent_present = true;
+              /* that's fine, we will override it */
+              continue;
             }
             if (qtype.getCode() != rr.qtype.getCode()
               && (exclusiveEntryTypes.count(qtype.getCode()) != 0