d_records.erase(std::make_pair(key, record.d_type));
}
-void CatalogZone::registerForwarders(const FWCatz& params, Logr::log_t logger)
+void CatalogZone::registerForwarders(const FWCatz& params, Logr::log_t logger) const
{
const string zonesFile = ::arg()["api-config-dir"] + "/catzone." + d_name.toString();
::rust::Vec<::pdns::rust::settings::rec::ForwardZone> forwards;
return soaRecordContent;
}
-void FWCatZoneXFR::preloadZoneFile(const DNSName& zoneName, std::shared_ptr<CatalogZone>& oldZone, uint32_t& refresh, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger)
+void FWCatZoneXFR::preloadZoneFile(const DNSName& zoneName, const std::shared_ptr<const CatalogZone>& oldZone, uint32_t& refresh, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger)
{
while (!d_params.soaRecordContent) {
/* if we received an empty sr, the zone was not really preloaded */
}
}
-bool FWCatZoneXFR::zoneTrackerIteration(const DNSName& zoneName, std::shared_ptr<CatalogZone>& oldZone, uint32_t& refresh, bool& skipRefreshDelay, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger)
+bool FWCatZoneXFR::zoneTrackerIteration(const DNSName& zoneName, std::shared_ptr<const CatalogZone>& oldZone, uint32_t& refresh, bool& skipRefreshDelay, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger)
{
// Don't hold on to oldZone, it well be re-assigned after sleep in the try block
oldZone = nullptr;
ZoneWaiter waiter(std::this_thread::get_id());
/* we can _never_ modify this zone directly, we need to do a full copy then replace the existing zone */
- std::shared_ptr<CatalogZone> oldZone;
+ std::shared_ptr<const CatalogZone> oldZone;
if (params.zoneIdx < g_luaconfs.getLocal()->catalogzones.size()) {
oldZone = g_luaconfs.getLocal()->catalogzones.at(params.zoneIdx).d_catz;
}
}
void add(const DNSRecord& record, Logr::log_t logger);
void remove(const DNSRecord& record, Logr::log_t logger);
- void registerForwarders(const FWCatz& params, Logr::log_t logger);
+ void registerForwarders(const FWCatz& params, Logr::log_t logger) const;
[[nodiscard]] bool versionCheck() const;
[[nodiscard]] bool dupsCheck() const;
static void zoneXFRTracker(ZoneXFRParams params, uint64_t configGeneration);
private:
- void preloadZoneFile(const DNSName& zoneName, std::shared_ptr<CatalogZone>& oldZone, uint32_t& refresh, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger);
- bool zoneTrackerIteration(const DNSName& zoneName, std::shared_ptr<CatalogZone>& oldZone, uint32_t& refresh, bool& skipRefreshDelay, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger);
+ void preloadZoneFile(const DNSName& zoneName, const std::shared_ptr<const CatalogZone>& oldZone, uint32_t& refresh, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger);
+ bool zoneTrackerIteration(const DNSName& zoneName, std::shared_ptr<const CatalogZone>& oldZone, uint32_t& refresh, bool& skipRefreshDelay, uint64_t configGeneration, ZoneWaiter& waiter, Logr::log_t logger);
};
std::string reloadZoneConfiguration(bool yaml);
algo: string
secret: base64string
refresh: number, default not set
- maxReceivedMBytes: number default not set
+ maxReceivedMBytes: number, default not set
localAddress: IP address, default not set
axfrTimeout: number, default 20
groups:
recurse: bool, default false
notify: bool, default false
-An example of an ``forwarding_catalog_zones`` entry, which is a sequence of `ForwardingCatalogZone`_:
+An example of a ``forwarding_catalog_zones`` entry, which is a sequence of `ForwardingCatalogZone`_:
.. code-block:: yaml
- forwarders: [192.168.178.3] # only default forwarder for 2nd catalog zone
:program:`Recursor` will transfer the catalog zone from the authoritative server using IXFR (falling back to AXFR if needed) and add forwarding clauses for all members of the catalog zone.
-The forwarding paremeters will be taken from the default group entry (the one without a name) defined in the YAML settings.
-For catalog zone members in a group, the forwarding parameters will be taken from the group entry with the correspoding name.
+The forwarding parameters will be taken from the default group entry (the one without a name) defined in the YAML settings.
+For catalog zone members in a group, the forwarding parameters will be taken from the group entry with the corresponding name.
The forwarding definitions will be written into a file ``$api_dir/catzone.$zonename``. :ref:`setting-yaml-webservice.api_dir` must be defined, the directory must exist and be writable by the :program:`Recursor` process.