]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix a secondary domain type check. 16213/head
authorMiod Vallat <miod.vallat@powerdns.com>
Mon, 6 Oct 2025 09:56:53 +0000 (11:56 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Mon, 6 Oct 2025 09:58:47 +0000 (11:58 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/bindbackend/bindbackend2.cc

index f1e33d445edbe678aa5ec03a8aea103485d2c41d..267dfc12c87502c6e2fe33b6238e3707e7dd77de 100644 (file)
@@ -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();