]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1855. [bug] ixfr-from-differences was failing to detect changes
authorMark Andrews <marka@isc.org>
Tue, 7 Jun 2005 02:02:05 +0000 (02:02 +0000)
committerMark Andrews <marka@isc.org>
Tue, 7 Jun 2005 02:02:05 +0000 (02:02 +0000)
                        of ttl due to dns_diff_subtract() was ignoring the ttl
                        of records.  [RT #14616]

CHANGES
doc/private/branches
lib/dns/journal.c

diff --git a/CHANGES b/CHANGES
index 42559c7ea448001f7f4e6800d5331672ddf37efb..5c8ca490f08a63c62a41fb17f408e83b42c89691 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -45,7 +45,9 @@
 1856.  [doc]           Switch Docbook toolchain from DSSSL to XSL.
                        [RT #11398]
 
-1855.  [placeholder]   rt14616
+1855.  [bug]           ixfr-from-differences was failing to detect changes
+                       of ttl due to dns_diff_subtract() was ignoring the ttl
+                       of records.  [RT #14616]
 
 1854.  [bug]           lwres also needs to know the print format for
                        (long long).  [RT #13754]
index 4a26c8bea88fc830f3dc72e2a0b18c53a833c792..802c2e2e28266ad8848981e642966a10e90eed52 100644 (file)
@@ -33,7 +33,7 @@ rt13606                               open    marka   // TSIG SHA256
 rt13662                                open    marka   // rrset-order fixed
 rt13753                                review  
 rt13771                                review  
-rt14616                                review  
+rt14616                                closed  
 rt14673                                closed  
 rt14695                                review  
 rt14775                                review  
index 0e024aed358366776245c8389c75de435101d818..00345c5b18619803e9a386362d678da58c83e7e0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: journal.c,v 1.91 2005/04/29 00:22:47 marka Exp $ */
+/* $Id: journal.c,v 1.92 2005/06/07 02:02:05 marka Exp $ */
 
 #include <config.h>
 
@@ -1746,6 +1746,8 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
        isc_result_t result;
        dns_difftuple_t *p[2];
        int i, t;
+       isc_boolean_t append;
+
        CHECK(dns_diff_sort(&diff[0], rdata_order));
        CHECK(dns_diff_sort(&diff[1], rdata_order));
 
@@ -1774,11 +1776,17 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
                }
                INSIST(t == 0);
                /*
-                * Identical RRs in both databases; skip them both.
+                * Identical RRs in both databases; skip them both
+                * if the ttl differs.
                 */
+               append = ISC_TF(p[0]->ttl != p[1]->ttl);
                for (i = 0; i < 2; i++) {
                        ISC_LIST_UNLINK(diff[i].tuples, p[i], link);
-                       dns_difftuple_free(&p[i]);
+                       if (append) {
+                               ISC_LIST_APPEND(r->tuples, p[i], link);
+                       } else {
+                               dns_difftuple_free(&p[i]);
+                       }
                }
        next: ;
        }