[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3704 - trunk/OpenDNSSEC/signer/src/signer

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Aug 10 14:41:53 CEST 2010


Author: matthijs
Date: 2010-08-10 14:41:52 +0200 (Tue, 10 Aug 2010)
New Revision: 3704

Modified:
   trunk/OpenDNSSEC/signer/src/signer/zonedata.c
Log:
bugreport #165 also applies to c engine

Modified: trunk/OpenDNSSEC/signer/src/signer/zonedata.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-08-10 11:55:26 UTC (rev 3703)
+++ trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-08-10 12:41:52 UTC (rev 3704)
@@ -675,19 +675,20 @@
 
     prev = zd->outbound_serial;
     if (se_strcmp(sc->soa_serial, "unixtime") == 0) {
-        soa = (uint32_t) time_now();
+        soa = se_max(zd->inbound_serial, (uint32_t) time_now());
         if (!DNS_SERIAL_GT(soa, prev)) {
             soa = prev + 1;
         }
         update = soa - prev;
     } else if (strncmp(sc->soa_serial, "counter", 7) == 0) {
-        soa = zd->inbound_serial;
+        soa = se_max(zd->inbound_serial, zd->outbound_serial);
         if (!DNS_SERIAL_GT(soa, prev)) {
             soa = prev + 1;
         }
         update = soa - prev;
     } else if (strncmp(sc->soa_serial, "datecounter", 11) == 0) {
         soa = (uint32_t) time_datestamp(0, "%Y%m%d", NULL) * 100;
+        soa = se_max(zd->inbound_serial, soa);
         if (!DNS_SERIAL_GT(soa, prev)) {
             soa = prev + 1;
         }




More information about the Opendnssec-commits mailing list