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

Matthijs Mekking matthijs at nlnetlabs.nl
Thu Oct 14 11:52:35 CEST 2010


Author: matthijs
Date: 2010-10-14 11:52:34 +0200 (Thu, 14 Oct 2010)
New Revision: 4109

Modified:
   trunk/OpenDNSSEC/signer/src/signer/domain.c
Log:
make sure that the singleton RRset actually contains RRs after the update.

http://www.pivotaltracker.com/story/show/5678430



Modified: trunk/OpenDNSSEC/signer/src/signer/domain.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-14 09:43:44 UTC (rev 4108)
+++ trunk/OpenDNSSEC/signer/src/signer/domain.c	2010-10-14 09:52:34 UTC (rev 4109)
@@ -308,6 +308,7 @@
 {
     ldns_rbnode_t* node = LDNS_RBTREE_NULL;
     rrset_type* rrset = NULL;
+    ldns_dnssec_rrs* rrs = NULL;
     char* str_name = NULL;
     char* str_type = NULL;
 
@@ -315,7 +316,7 @@
     se_log_assert(rrtype);
 
     rrset = domain_lookup_rrset(domain, rrtype);
-    if (rrset) {
+    if (rrset && rrset_count_RR(rrset) > 0) {
         if (domain_count_rrset(domain) < 2) {
             /* one or zero, that's ok */
             return 0;
@@ -331,6 +332,11 @@
                 str_name = ldns_rdf2str(domain->name);
                 str_type = ldns_rr_type2str(rrtype);
                 se_log_error("other data next to %s %s", str_name, str_type);
+                rrs = rrset->rrs;
+                while (rrs) {
+                    log_rr(rrs->rr, "next-to-CNAME: ", 2);
+                    rrs = rrs->next;
+                }
                 se_free((void*)str_name);
                 se_free((void*)str_type);
                 return 1;




More information about the Opendnssec-commits mailing list