]> granicus.if.org Git - pdns/commitdiff
Add an option to allow AXFR of zones with a different serial.
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 16 Mar 2017 20:26:02 +0000 (21:26 +0100)
committermind04 <mind04@monshouwer.org>
Fri, 17 Mar 2017 10:01:46 +0000 (11:01 +0100)
docs/markdown/authoritative/settings.md
pdns/common_startup.cc
pdns/slavecommunicator.cc

index 8d85cf4894c0c7a571330cd27cd6ad1a9549360f..2b93f3f0a0a318c36ac06c9536df73d93678c8ee 100644 (file)
@@ -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
index cf516d954f4b5abb777dbdc8569c2467c009176c..6572f6b2655f232cd88e958dea17bc34dd9b6f06 100644 (file)
@@ -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";
 }
index 2828a7289ac2d397368499db3879e0682bafb169..ff6bdbd6da1b81f9539cade245b150bca9de5082 100644 (file)
@@ -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<<Logger::Error<<"Domain '"<<di.zone<<"' more recent than master, our serial " << ourserial << " > their serial "<< theirserial << endl;
       di.backend->setFresh(di.id);
     }