From: Otto Moerbeek Date: Tue, 8 Oct 2024 07:39:00 +0000 (+0200) Subject: Allow notify of catz; rename name field to zone for consistency X-Git-Tag: rec-5.2.0-alpha1~7^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75bfbd2df0086c1fd57a20a46c4d1df8f0fe5eac;p=thirdparty%2Fpdns.git Allow notify of catz; rename name field to zone for consistency --- diff --git a/pdns/recursordist/rec-xfr.cc b/pdns/recursordist/rec-xfr.cc index a7b07cff3d..265617cb4f 100644 --- a/pdns/recursordist/rec-xfr.cc +++ b/pdns/recursordist/rec-xfr.cc @@ -34,7 +34,6 @@ static const DNSName cZones("zones"); static const DNSName cVersion("version"); // TODO: cleanup files if not in catalogzones? -// TODO: notify to catzone (works but for #14506) void CatalogZone::add(const DNSRecord& record, Logr::log_t logger) { diff --git a/pdns/recursordist/settings/cxxsupport.cc b/pdns/recursordist/settings/cxxsupport.cc index d465fd0bc1..3fe87af6da 100644 --- a/pdns/recursordist/settings/cxxsupport.cc +++ b/pdns/recursordist/settings/cxxsupport.cc @@ -310,7 +310,8 @@ void pdns::settings::rec::processAPIDir(const string& includeDirOnCommandLine, p possiblyConvertForwardsandAuths(includeDir, apiDir, log); } -static void addToAllowNotifyFor(Recursorsettings& settings, const rust::Vec<::pdns::rust::settings::rec::ForwardZone>& vec) +template +static void addToAllowNotifyFor(Recursorsettings& settings, const rust::Vec& vec) { for (const auto& item : vec) { if (item.notify_allowed) { @@ -342,6 +343,7 @@ pdns::settings::rec::YamlSettingsStatus pdns::settings::rec::readYamlSettings(co // run --config, while they aren't actually there in any config file. addToAllowNotifyFor(yamlstruct, yamlstruct.recursor.forward_zones); addToAllowNotifyFor(yamlstruct, yamlstruct.recursor.forward_zones_recurse); + addToAllowNotifyFor(yamlstruct, yamlstruct.recursor.forwarding_catalog_zones); yamlstruct.validate(); settings = std::move(yamlstruct); return YamlSettingsStatus::OK; @@ -1317,7 +1319,7 @@ void fromRustToLuaConfig(const rust::Vec