From: Kees Monshouwer Date: Thu, 16 Mar 2017 20:26:02 +0000 (+0100) Subject: Add an option to allow AXFR of zones with a different serial. X-Git-Tag: rec-4.1.0-alpha1~208^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f76617d1013f69179257d8cbe62c58ffdde400c;p=pdns Add an option to allow AXFR of zones with a different serial. --- diff --git a/docs/markdown/authoritative/settings.md b/docs/markdown/authoritative/settings.md index 642782b69..732f733fd 100644 --- a/docs/markdown/authoritative/settings.md +++ b/docs/markdown/authoritative/settings.md @@ -96,6 +96,13 @@ Static pre-shared authentication key for access to the REST API. Disallow data modification through the REST API when set. +## `axfr-lower-serial` +* Boolean +* Default: no +* Available since: 4.0.4 + +Also AXFR a zone from a master with a lower serial. + ## `cache-ttl` * Integer * Default: 20 diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 4dd592b6b..8eaa5b92c 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -193,6 +193,7 @@ void declareArguments() ::arg().setSwitch("outgoing-axfr-expand-alias", "Expand ALIAS records during outgoing AXFR")="no"; ::arg().setSwitch("8bit-dns", "Allow 8bit dns queries")="no"; + ::arg().setSwitch("axfr-lower-serial", "Also AXFR a zone from a master with a lower serial")="no"; ::arg().set("xfr-max-received-mbytes", "Maximum number of megabytes received from an incoming XFR")="100"; } diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 8bbac7871..9e4a7529e 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -861,7 +861,7 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) uint32_t theirserial = ssr.d_freshness[di.id].theirSerial, ourserial = di.serial; - if(rfc1982LessThan(theirserial, ourserial) && ourserial != 0) { + if(rfc1982LessThan(theirserial, ourserial) && ourserial != 0 && !::arg().mustDo("axfr-lower-serial")) { L< their serial "<< theirserial << endl; di.backend->setFresh(di.id); }