From: Kees Monshouwer Date: Mon, 24 Oct 2022 08:24:06 +0000 (+0200) Subject: auth: catalog zones, avoid bulk zone reset while migrating to a catalog X-Git-Tag: dnsdist-1.8.0-rc1~261^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0cdc7532bb598b71f9fcc234bbb2a081d923017;p=thirdparty%2Fpdns.git auth: catalog zones, avoid bulk zone reset while migrating to a catalog --- diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index fe5c40a5aa..5cec49137f 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -121,7 +121,13 @@ static bool catalogDiff(const DomainInfo& di, vector& fromXFR, vect else { CatalogInfo ciXFR = *xfr; CatalogInfo ciDB = *db; - if (ciXFR.d_unique == ciDB.d_unique) { // update + if (ciDB.d_unique.empty() || ciXFR.d_unique == ciDB.d_unique) { // update + + if (ciDB.d_unique.empty()) { // set unique + g_log << Logger::Warning << logPrefix << "set unique, zone '" << ciXFR.d_zone << "' is now a member" << endl; + ciDB.d_unique = ciXFR.d_unique; + doOptions = true; + } if (ciXFR.d_coo != ciDB.d_coo) { // update coo g_log << Logger::Warning << logPrefix << "update coo for zone '" << ciXFR.d_zone << "' to '" << ciXFR.d_coo << "'" << endl;