]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3023. [bug] Named could be left in an inconsistent state when
authorEvan Hunt <each@isc.org>
Fri, 18 Feb 2011 21:26:04 +0000 (21:26 +0000)
committerEvan Hunt <each@isc.org>
Fri, 18 Feb 2011 21:26:04 +0000 (21:26 +0000)
receiving multiple AXFR response messages that were
not all TSIG-signed. [RT #23254]

CHANGES
lib/dns/xfrin.c

diff --git a/CHANGES b/CHANGES
index 80b44d29552677950e93815777363a937b9da7bd..9388013f71fa81e7079f1f80ceeacf2d687135eb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3023.  [bug]           Named could be left in an inconsistent state when
+                       receiving multiple AXFR response messages that were
+                       not all TSIG-signed. [RT #23254]
+
 3022.   [bug]           Fixed prz SERVFAILs after failed zone transfers
                         [RT #23246]
 
@@ -6,7 +10,7 @@
 3020.  [bug]           auto-dnssec failed to correctly update the zone when
                        changing the DNSKEY RRset. [RT #23232]
 
-3019.  [func]          Test: check apex NSEC3 records after adding DNSKEY
+3019.  [test]          Test: check apex NSEC3 records after adding DNSKEY
                        record via UPDATE. [RT #23229]
 
        --- 9.8.0rc1 released ---
index 4e3d2c36f1f752ba821aaa1137fce86d6311f265..e7d4a9872f7e79cb6e1c23d9ee9cc93ae7aa4b6d 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: xfrin.c,v 1.166 2008/09/25 04:12:39 marka Exp $ */
+/* $Id: xfrin.c,v 1.166.522.1 2011/02/18 21:26:04 each Exp $ */
 
 /*! \file */
 
@@ -203,6 +203,7 @@ static isc_result_t axfr_putdata(dns_xfrin_ctx_t *xfr, dns_diffop_t op,
                                   dns_rdata_t *rdata);
 static isc_result_t axfr_apply(dns_xfrin_ctx_t *xfr);
 static isc_result_t axfr_commit(dns_xfrin_ctx_t *xfr);
+static isc_result_t axfr_finalize(dns_xfrin_ctx_t *xfr);
 
 static isc_result_t ixfr_init(dns_xfrin_ctx_t *xfr);
 static isc_result_t ixfr_apply(dns_xfrin_ctx_t *xfr);
@@ -318,6 +319,16 @@ axfr_commit(dns_xfrin_ctx_t *xfr) {
 
        CHECK(axfr_apply(xfr));
        CHECK(dns_db_endload(xfr->db, &xfr->axfr.add_private));
+
+       result = ISC_R_SUCCESS;
+ failure:
+       return (result);
+}
+
+static isc_result_t
+axfr_finalize(dns_xfrin_ctx_t *xfr) {
+       isc_result_t result;
+
        CHECK(dns_zone_replacedb(xfr->zone, xfr->db, ISC_TRUE));
 
        result = ISC_R_SUCCESS;
@@ -1350,6 +1361,8 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
                xfr->state = XFRST_INITIALSOA;
                CHECK(xfrin_send_request(xfr));
        } else if (xfr->state == XFRST_END) {
+               CHECK(axfr_finalize(xfr));
+
                /*
                 * Close the journal.
                 */