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

Matthijs Mekking matthijs at nlnetlabs.nl
Wed Oct 13 12:03:47 CEST 2010


Author: matthijs
Date: 2010-10-13 12:03:47 +0200 (Wed, 13 Oct 2010)
New Revision: 4095

Modified:
   trunk/OpenDNSSEC/signer/src/signer/domain.c
   trunk/OpenDNSSEC/signer/src/signer/rrset.c
   trunk/OpenDNSSEC/signer/src/signer/rrset.h
Log:
no use for outbound serial in RRset structure

also, keep track of new SOA RRSIGS



Modified: trunk/OpenDNSSEC/signer/src/signer/domain.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-13 10:00:02 UTC (rev 4094)
+++ trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-13 10:03:47 UTC (rev 4095)
@@ -825,7 +825,7 @@
     if (sc->nsec_type == LDNS_RR_TYPE_NSEC3) {
         if (domain->nsec3 && domain->nsec3->nsec_rrset) {
             error = rrset_sign(ctx, domain->nsec3->nsec_rrset, owner, sc,
-                signtime, serial, stats);
+                signtime, stats);
             if (error) {
                 se_log_error("failed to sign NSEC3 RRset");
                 return error;
@@ -833,7 +833,7 @@
         }
     } else if (domain->nsec_rrset) {
         error = rrset_sign(ctx, domain->nsec_rrset, owner, sc, signtime,
-            serial, stats);
+            stats);
         if (error) {
             se_log_error("failed to sign NSEC RRset");
             return error;
@@ -878,7 +878,7 @@
             }
         }
 
-        error = rrset_sign(ctx, rrset, owner, sc, signtime, serial, stats);
+        error = rrset_sign(ctx, rrset, owner, sc, signtime, stats);
         if (error) {
             se_log_error("failed to sign RRset[%i]", (int) rrset->rr_type);
             return error;

Modified: trunk/OpenDNSSEC/signer/src/signer/rrset.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/rrset.c	2010-10-13 10:00:02 UTC (rev 4094)
+++ trunk/OpenDNSSEC/signer/src/signer/rrset.c	2010-10-13 10:03:47 UTC (rev 4095)
@@ -57,7 +57,6 @@
     rrset->add_count = 0;
     rrset->del_count = 0;
     rrset->internal_serial = 0;
-    rrset->outbound_serial = 0;
     rrset->rrs = ldns_dnssec_rrs_new();
     rrset->add = NULL;
     rrset->del = NULL;
@@ -82,7 +81,6 @@
     rrset->del_count = 0;
     rrset->rrsig_count = 0;
     rrset->internal_serial = 0;
-    rrset->outbound_serial = 0;
     rrset->rrs = ldns_dnssec_rrs_new();
     rrset->rrs->rr = rr;
     rrset->add = NULL;
@@ -718,7 +716,7 @@
  */
 int
 rrset_sign(hsm_ctx_t* ctx, rrset_type* rrset, ldns_rdf* owner,
-    signconf_type* sc, time_t signtime, uint32_t serial, stats_type* stats)
+    signconf_type* sc, time_t signtime, stats_type* stats)
 {
     int error = 0;
     uint32_t newsigs = 0;
@@ -735,7 +733,6 @@
     se_log_assert(sc);
     se_log_assert(stats);
 
-    if (DNS_SERIAL_GT(serial, rrset->outbound_serial)) {
         /* drop unrecyclable signatures */
         error = rrset_recycle_rrsigs(rrset, sc, signtime, &reusedsigs);
 
@@ -851,11 +848,9 @@
         rrsigs_cleanup(new_rrsigs);
         ldns_rr_list_free(rr_list);
 
-        rrset->outbound_serial = serial;
-    } else {
-        se_log_warning("not signing RRset[%i]: up to date", rrset->rr_type);
+    if (rrset->rr_type == LDNS_RR_TYPE_SOA) {
+        stats->sig_soa_count += newsigs;
     }
-
     stats->sig_count += newsigs;
     stats->sig_reuse += reusedsigs;
     return 0;

Modified: trunk/OpenDNSSEC/signer/src/signer/rrset.h
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/rrset.h	2010-10-13 10:00:02 UTC (rev 4094)
+++ trunk/OpenDNSSEC/signer/src/signer/rrset.h	2010-10-13 10:03:47 UTC (rev 4095)
@@ -50,7 +50,6 @@
     uint32_t del_count;
     uint32_t rrsig_count;
     uint32_t internal_serial;
-    uint32_t outbound_serial;
     ldns_dnssec_rrs* rrs;
     ldns_dnssec_rrs* add;
     ldns_dnssec_rrs* del;
@@ -137,13 +136,12 @@
  * \param[in] owner owner of the zone
  * \param[in] sc sign configuration
  * \param[in] signtime time when the zone is signd
- * \param[in] serial outbound serial
  * \param[out] stats update statistics
  * \return 0 on success, 1 on error
  *
  */
 int rrset_sign(hsm_ctx_t* ctx, rrset_type* rrset, ldns_rdf* owner,
-    signconf_type* sc, time_t signtime, uint32_t serial, stats_type* stats);
+    signconf_type* sc, time_t signtime, stats_type* stats);
 
 /**
  * Delete all RRs from RRset.




More information about the Opendnssec-commits mailing list