From: Peter van Dijk Date: Tue, 6 Dec 2022 16:42:27 +0000 (+0100) Subject: auth lmdb: make outgoing notifications work X-Git-Tag: dnsdist-1.8.0-rc1~179^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbd6102241d18d8bce551b5e19d0c315368913b9;p=thirdparty%2Fpdns.git auth lmdb: make outgoing notifications work --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index 797aab3866..c5f1bb7827 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -1097,6 +1097,7 @@ void LMDBBackend::getUpdatedMasters(vector& updatedDomains, std::uno auto txn = d_tdomains->getROTransaction(); for (auto iter = txn.begin(); iter != txn.end(); ++iter) { + if (!iter->isPrimaryType()) { continue; } @@ -1107,13 +1108,16 @@ void LMDBBackend::getUpdatedMasters(vector& updatedDomains, std::uno continue; // Producer fresness check is performed elsewhere } + di = *iter; + di.id = iter.getID(); + if (!iter->catalog.empty()) { ci.fromJson(iter->options, CatalogInfo::CatalogType::Producer); - ci.updateHash(catalogHashes, *iter); + ci.updateHash(catalogHashes, di); } - di = *iter; if (getSerial(di) && di.serial != di.notified_serial) { + di.backend = this; updatedDomains.emplace_back(di); } } @@ -1122,7 +1126,7 @@ void LMDBBackend::getUpdatedMasters(vector& updatedDomains, std::uno void LMDBBackend::setNotified(uint32_t domain_id, uint32_t serial) { genChangeDomain(domain_id, [serial](DomainInfo& di) { - di.serial = serial; + di.notified_serial = serial; }); }