]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1649. [bug] Silence "unexpected non-minimal diff" message.
authorMark Andrews <marka@isc.org>
Fri, 4 Jun 2004 03:44:53 +0000 (03:44 +0000)
committerMark Andrews <marka@isc.org>
Fri, 4 Jun 2004 03:44:53 +0000 (03:44 +0000)
                        [RT #11206]

CHANGES
bin/named/update.c

diff --git a/CHANGES b/CHANGES
index cdd2b0093cbbb767ed378a2e3adcb6d1e35ee03d..a8219d205e3e9316d760fcbd424103d69e9a82fa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
-1649.  [placeholder]   rt11206
+1649.  [bug]           Silence "unexpected non-minimal diff" message.
+                       [RT #11206]
 
 1648.  [func]          Update dnssec-lookaside named.conf syntax to support
                        multiple dnssec-lookaside namespaces (not yet
index ee6114e0e2ddaa036ec14324ee71d45247d0cf53..f5e8b421f31bb24690066eddfe12301a3e203f92 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: update.c,v 1.112 2004/05/12 06:38:37 marka Exp $ */
+/* $Id: update.c,v 1.113 2004/06/04 03:44:53 marka Exp $ */
 
 #include <config.h>
 
@@ -1102,14 +1102,16 @@ add_rr_prepare_action(void *data, rr_t *rr) {
        isc_result_t result = ISC_R_SUCCESS;    
        add_rr_prepare_ctx_t *ctx = data;
        dns_difftuple_t *tuple = NULL;
+       isc_boolean_t equal;
 
        /*
         * If the update RR is a "duplicate" of the update RR,
         * the update should be silently ignored.
         */
-       if (dns_rdata_compare(&rr->rdata, ctx->update_rr) == 0 &&
-           rr->ttl == ctx->update_rr_ttl) {
+       equal = ISC_TF(dns_rdata_compare(&rr->rdata, ctx->update_rr) == 0);
+       if (equal && rr->ttl == ctx->update_rr_ttl) {
                ctx->ignore_add = ISC_TRUE;
+               return (ISC_R_SUCCESS);
        }
 
        /*
@@ -1137,12 +1139,14 @@ add_rr_prepare_action(void *data, rr_t *rr) {
                                           &rr->rdata,
                                           &tuple));
                dns_diff_append(&ctx->del_diff, &tuple);
-               CHECK(dns_difftuple_create(ctx->add_diff.mctx,
-                                          DNS_DIFFOP_ADD, ctx->name,
-                                          ctx->update_rr_ttl,
-                                          &rr->rdata,
-                                          &tuple));
-               dns_diff_append(&ctx->add_diff, &tuple);
+               if (!equal) {
+                       CHECK(dns_difftuple_create(ctx->add_diff.mctx,
+                                                  DNS_DIFFOP_ADD, ctx->name,
+                                                  ctx->update_rr_ttl,
+                                                  &rr->rdata,
+                                                  &tuple));
+                       dns_diff_append(&ctx->add_diff, &tuple);
+               }
        }
  failure:
        return (result);