From: Remi Gacogne Date: Tue, 7 May 2019 09:57:04 +0000 (+0200) Subject: auth: Fix ENTs removal when "replacing" new records X-Git-Tag: rec-4.2.0-rc1~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=002c4fe1ee34cdeeb8ee95cf59c992ff5085f8df;p=pdns auth: Fix ENTs removal when "replacing" new records --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index e3f32a509..bf20af53c 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -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