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

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Oct 12 10:46:57 CEST 2010


Author: matthijs
Date: 2010-10-12 10:46:57 +0200 (Tue, 12 Oct 2010)
New Revision: 4080

Modified:
   trunk/OpenDNSSEC/signer/src/signer/domain.c
   trunk/OpenDNSSEC/signer/src/signer/zonedata.c
Log:
different error code for serial arethmetic error and library failure



Modified: trunk/OpenDNSSEC/signer/src/signer/domain.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-12 08:42:29 UTC (rev 4079)
+++ trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-12 08:46:57 UTC (rev 4080)
@@ -449,7 +449,7 @@
     } else {
         se_log_error("cannot update domain: serial %u should be larger than "
             "domain internal serial %u", serial, domain->internal_serial);
-        return 1;
+        return 2;
     }
     return 0;
 }

Modified: trunk/OpenDNSSEC/signer/src/signer/zonedata.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-10-12 08:42:29 UTC (rev 4079)
+++ trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-10-12 08:46:57 UTC (rev 4080)
@@ -1101,10 +1101,18 @@
     }
     while (node && node != LDNS_RBTREE_NULL) {
         domain = (domain_type*) node->data;
-        if (domain_update(domain, zd->internal_serial) != 0) {
-            se_log_crit("unable to update zonedata to serial %u: failed "
-                "to update domain", zd->internal_serial);
-            /* If this happens, the zone is partially updated. */
+        error = domain_update(domain, zd->internal_serial);
+        if (error != 0) {
+            if (error == 1) {
+                se_log_crit("unable to update zonedata to serial %u: rr "
+                    "compare function failed", zd->internal_serial);
+                /* If this happens, the zone is partially updated. */
+            } else {
+                se_log_error("unable to update zonedata to serial %u: "
+                    "serial too small", zd->internal_serial
+                zonedata_cancel_update(zd);
+                return 1;
+            }
             return 1;
         }
         node = ldns_rbtree_next(node);




More information about the Opendnssec-commits mailing list