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: auth-4.0.4-rc1~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51418ff4e5ceaf45a070697d737254ceb991d383;p=thirdparty%2Fpdns.git 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 8d85cf4894..2b93f3f0a0 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 cf516d954f..6572f6b265 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -187,6 +187,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 2828a7289a..ff6bdbd6da 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -840,7 +840,7 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) continue; 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); }