From: Miod Vallat Date: Mon, 6 Oct 2025 09:56:53 +0000 (+0200) Subject: Fix a secondary domain type check. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F16213%2Fhead;p=thirdparty%2Fpdns.git Fix a secondary domain type check. Signed-off-by: Miod Vallat --- diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index f1e33d445e..267dfc12c8 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -1071,10 +1071,13 @@ void Bind2Backend::loadConfig(string* status) // NOLINT(readability-function-cog } catch (std::system_error& ae) { ostringstream msg; - if (ae.code().value() == ENOENT && isNew && domain.type == "slave") + bool missingNewSecondary = ae.code().value() == ENOENT && isNew && kind == DomainInfo::Secondary; + if (missingNewSecondary) { msg << " error at " + nowTime() << " no file found for new secondary domain '" << domain.name << "'. Has not been AXFR'd yet"; - else + } + else { msg << " error at " + nowTime() + " parsing '" << domain.name << "' from file '" << domain.filename << "': " << ae.what(); + } if (status != nullptr) *status += msg.str();