From: Peter van Dijk Date: Mon, 15 Nov 2021 15:28:58 +0000 (+0100) Subject: auth 2136: apply new TTL to whole RRset, not only to the added record X-Git-Tag: dnsdist-1.7.0-beta1~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10981%2Fhead;p=thirdparty%2Fpdns.git auth 2136: apply new TTL to whole RRset, not only to the added record fixes #10921 --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index be1d3aa521..ea985b35c0 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -194,8 +194,10 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, for (auto& i : rrset) { string icontent = i.getZoneRepresentation(); if (lowerCase) icontent = toLower(icontent); - if (rrType == i.qtype.getCode() && icontent == content) { - foundRecord=true; + if (rrType == i.qtype.getCode()) { + if (icontent == content) { + foundRecord=true; + } if (i.ttl != rr->d_ttl) { i.ttl = rr->d_ttl; updateTTL++; @@ -204,10 +206,10 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, } if (updateTTL > 0) { di->backend->replaceRRSet(di->id, rr->d_name, rrType, rrset); - g_log<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"<