From: Matti Hiljanen Date: Tue, 25 Jun 2019 10:51:41 +0000 (+0300) Subject: auth: SLAVE-RENOTIFY zone metadata support X-Git-Tag: rec-4.3.0-alpha1~5^2~1 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fpdns.git;a=commitdiff_plain;h=7b4e8eed6d87a04e682bcfcf28b49a35f03f0930 auth: SLAVE-RENOTIFY zone metadata support --- diff --git a/docs/domainmetadata.rst b/docs/domainmetadata.rst index 926628037f..59705615ab 100644 --- a/docs/domainmetadata.rst +++ b/docs/domainmetadata.rst @@ -172,6 +172,16 @@ This metadata can also be set using the and ``set-publish-cds``. For an example for an :rfc:`7344` key rollover, see the :doc:`guides/kskrollcdnskey`. +.. _metadata-slave-renotify: + +SLAVE-RENOTIFY +-------------- +.. versionadded:: 4.3.0 + +If set to 1, will make PowerDNS renotify the slaves after an AXFR is received from a master. +Any other value means that no renotifies are done. If not set at all, action will depend on +the :ref:`setting-slave-renotify` setting. + .. _metadata-soa-edit: SOA-EDIT diff --git a/docs/settings.rst b/docs/settings.rst index 3c00056cfd..94f518ebab 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -1404,6 +1404,8 @@ This setting will make PowerDNS renotify the slaves after an AXFR is *received* from a master. This is useful when using when running a signing-slave. +See :ref:`metadata-slave-renotify` to set this per-zone. + .. _setting-soa-expire-default: ``soa-expire-default`` diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 53b66197c3..46e4c8f15d 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -599,7 +599,19 @@ void CommunicatorClass::suck(const DNSName &domain, const ComboAddress& remote) g_log< meta; + if (B.getDomainMetadata(domain, "SLAVE-RENOTIFY", meta) && meta.size() > 0) { + if (meta[0] == "1") { + renotify = true; + } else { + renotify = false; + } + } + if(renotify) notifyDomain(domain); } catch(DBException &re) {