From 002c4fe1ee34cdeeb8ee95cf59c992ff5085f8df Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 7 May 2019 11:57:04 +0200 Subject: [PATCH] auth: Fix ENTs removal when "replacing" new records --- pdns/ws-auth.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index e3f32a5099..bf20af53c9 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 -- 2.47.2