]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Detect faulty config (catz used but api-dir not set)
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 8 Oct 2024 13:05:45 +0000 (15:05 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 4 Nov 2024 14:20:14 +0000 (15:20 +0100)
pdns/recursordist/settings/cxxsupport.cc

index 55e51e69edb0e85de5cca9ea9591cf45bf70e631..7d752773adc1b4949b7126f0aaf76e1d5d882cd5 100644 (file)
@@ -1427,6 +1427,10 @@ pdns::settings::rec::YamlSettingsStatus pdns::settings::rec::tryReadYAML(const s
            startupLog->info(Logr::Error, err, "configname", Logging::Loggable(yamlconfigname)));
       yamlstatus = pdns::settings::rec::PresentButFailed;
     }
+    else if (!settings.recursor.forwarding_catalog_zones.empty() && settings.webservice.api_dir.empty()) {
+      startupLog->info(Logr::Error, "Catalog zones defined, but webservice.api_dir is not set", "configname", Logging::Loggable(yamlconfigname));
+      yamlstatus = pdns::settings::rec::PresentButFailed;
+    }
     else if (setGlobals) {
       pdns::settings::rec::bridgeStructToOldStyleSettings(settings);
     }