]> granicus.if.org Git - pdns/commitdiff
When serial is 0, assume zone not present
authorAki Tuomi <cmouse@cmouse.fi>
Wed, 2 Dec 2015 09:20:24 +0000 (11:20 +0200)
committerAki Tuomi <cmouse@desteem.org>
Tue, 22 Dec 2015 15:55:01 +0000 (17:55 +0200)
Previously, if our serial was 0, and new serial was
bigger than 2^31, then we assumed that the old serial
was larger than new serial, preventing zone from
being transferred. After this change, 0 is treated
specially in the comparison.

pdns/slavecommunicator.cc

index 40dd15948cb66f0646a9e6075b3529f219419d1f..0e261a8a9fc90a23fd215836868945d60b64e9cf 100644 (file)
@@ -648,7 +648,7 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P)
       continue;
     uint32_t theirserial = ssr.d_freshness[di.id].theirSerial, ourserial = di.serial;
 
-    if(rfc1982LessThan(theirserial, ourserial)) {
+    if(rfc1982LessThan(theirserial, ourserial) && ourserial != 0) {
       L<<Logger::Error<<"Domain '"<<di.zone<<"' more recent than master, our serial " << ourserial << " > their serial "<< theirserial << endl;
       di.backend->setFresh(di.id);
     }