]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1742. [bug] Deleting all records at a node then adding a
authorMark Andrews <marka@isc.org>
Thu, 21 Oct 2004 01:29:29 +0000 (01:29 +0000)
committerMark Andrews <marka@isc.org>
Thu, 21 Oct 2004 01:29:29 +0000 (01:29 +0000)
                        previously existing record, in a single UPDATE
                        transaction, failed to leave / regenerate the
                        associated RRSIG records. [RT #12788]

CHANGES
bin/named/update.c

diff --git a/CHANGES b/CHANGES
index 4f389e2cf8465ba599fac6bd65f35d6e259cceeb..0bc83d8c50a89efc8395317f7a5383af9ba16a2b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 1744.  [bug]           If tuple2msgname() failed to convert a tuple to
                        a name a REQUIRE could be triggered. [RT #12796]
 
-1743.  [placeholder]   rt12790
-
-1742.  [bug]           If isc_taskmgr_create() was not able to create the
+1743.  [bug]           If isc_taskmgr_create() was not able to create the
                        requested number of worker threads then destruction
                        of the manager would trigger an INSIST() failure.
                        [RT #12790]
                        
+1742.  [bug]           Deleting all records at a node then adding a
+                       previously existing record, in a single UPDATE
+                       transaction, failed to leave / regenerate the
+                       associated RRSIG records. [RT #12788]
+
 1741.  [bug]           Deleting all records at a node in a secure zone
                        using a update-policy grant failed. [RT #12787]
 
index f249fc846f6479def75335d45cfa3420ff1be3a6..9f9c395cbf4f1d7b438356831bc80b773911faa0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: update.c,v 1.117 2004/10/12 21:57:57 marka Exp $ */
+/* $Id: update.c,v 1.118 2004/10/21 01:29:29 marka Exp $ */
 
 #include <config.h>
 
@@ -965,13 +965,27 @@ typedef struct {
  */
 
 /*
- * Return true iff 'update_rr' is neither a SOA nor an NS RR.
+ * Return true iff 'db_rr' is neither a SOA nor an NS RR nor
+ * an RRSIG nor a NSEC.
  */
 static isc_boolean_t
 type_not_soa_nor_ns_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        return ((db_rr->type != dns_rdatatype_soa &&
-                db_rr->type != dns_rdatatype_ns) ?
+                db_rr->type != dns_rdatatype_ns &&
+                db_rr->type != dns_rdatatype_rrsig &&
+                db_rr->type != dns_rdatatype_nsec) ?
+               ISC_TRUE : ISC_FALSE);
+}
+
+/*
+ * Return true iff 'db_rr' is neither a RRSIG nor a NSEC.
+ */
+static isc_boolean_t
+type_not_dnssec(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
+       UNUSED(update_rr);
+       return ((db_rr->type != dns_rdatatype_rrsig &&
+                db_rr->type != dns_rdatatype_nsec) ?
                ISC_TRUE : ISC_FALSE);
 }
 
@@ -2514,7 +2528,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                                        dns_rdatatype_any, 0,
                                                        &rdata, &diff));
                                } else {
-                                       CHECK(delete_if(true_p, db, ver, name,
+                                       CHECK(delete_if(type_not_dnssec,
+                                                       db, ver, name,
                                                        dns_rdatatype_any, 0,
                                                        &rdata, &diff));
                                }