mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
747. [bug] The code to determine whether an IXFR was possible
did not properly check for a database that could not have a journal. [RT #908]
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
|||||||
|
747. [bug] The code to determine whether an IXFR was possible
|
||||||
|
did not properly check for a database that could
|
||||||
|
not have a journal. [RT #908]
|
||||||
|
|
||||||
746. [bug] The sdb didn't clone rdatasets properly, causing
|
746. [bug] The sdb didn't clone rdatasets properly, causing
|
||||||
a crash when the server followed delegations. [RT #905]
|
a crash when the server followed delegations. [RT #905]
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: update.c,v 1.83 2001/02/15 19:38:09 gson Exp $ */
|
/* $Id: update.c,v 1.84 2001/02/22 19:15:01 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -2386,6 +2386,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||||||
* to the journal.
|
* to the journal.
|
||||||
*/
|
*/
|
||||||
if (! ISC_LIST_EMPTY(diff.tuples)) {
|
if (! ISC_LIST_EMPTY(diff.tuples)) {
|
||||||
|
char *journalfile;
|
||||||
dns_journal_t *journal;
|
dns_journal_t *journal;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2409,23 +2410,25 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update_log(client, zone, LOGLEVEL_DEBUG,
|
journalfile = dns_zone_getjournal(zone);
|
||||||
"writing journal %s",
|
if (journalfile != NULL) {
|
||||||
dns_zone_getjournal(zone));
|
update_log(client, zone, LOGLEVEL_DEBUG,
|
||||||
|
"writing journal %s", journalfile);
|
||||||
|
|
||||||
journal = NULL;
|
journal = NULL;
|
||||||
result = dns_journal_open(mctx, dns_zone_getjournal(zone),
|
result = dns_journal_open(mctx, journalfile,
|
||||||
ISC_TRUE, &journal);
|
ISC_TRUE, &journal);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
FAILS(result, "journal open failed");
|
FAILS(result, "journal open failed");
|
||||||
|
|
||||||
|
result = dns_journal_write_transaction(journal, &diff);
|
||||||
|
if (result != ISC_R_SUCCESS) {
|
||||||
|
dns_journal_destroy(&journal);
|
||||||
|
FAILS(result, "journal write failed");
|
||||||
|
}
|
||||||
|
|
||||||
result = dns_journal_write_transaction(journal, &diff);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
dns_journal_destroy(&journal);
|
dns_journal_destroy(&journal);
|
||||||
FAILS(result, "journal write failed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dns_journal_destroy(&journal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: xfrout.c,v 1.93 2001/01/12 19:01:39 gson Exp $ */
|
/* $Id: xfrout.c,v 1.94 2001/02/22 19:15:00 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -865,6 +865,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
|||||||
isc_netaddr_t na;
|
isc_netaddr_t na;
|
||||||
dns_peer_t *peer = NULL;
|
dns_peer_t *peer = NULL;
|
||||||
isc_buffer_t *tsigbuf = NULL;
|
isc_buffer_t *tsigbuf = NULL;
|
||||||
|
char *journalfile;
|
||||||
|
|
||||||
switch (reqtype) {
|
switch (reqtype) {
|
||||||
case dns_rdatatype_axfr:
|
case dns_rdatatype_axfr:
|
||||||
@@ -1048,11 +1049,15 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
|||||||
CHECK(soa_rrstream_create(mctx, db, ver, &stream));
|
CHECK(soa_rrstream_create(mctx, db, ver, &stream));
|
||||||
goto have_stream;
|
goto have_stream;
|
||||||
}
|
}
|
||||||
result = ixfr_rrstream_create(mctx,
|
journalfile = dns_zone_getjournal(zone);
|
||||||
dns_zone_getjournal(zone),
|
if (journalfile != NULL)
|
||||||
begin_serial,
|
result = ixfr_rrstream_create(mctx,
|
||||||
current_serial,
|
journalfile,
|
||||||
&data_stream);
|
begin_serial,
|
||||||
|
current_serial,
|
||||||
|
&data_stream);
|
||||||
|
else
|
||||||
|
result = ISC_R_NOTFOUND;
|
||||||
if (result == ISC_R_NOTFOUND ||
|
if (result == ISC_R_NOTFOUND ||
|
||||||
result == ISC_R_RANGE) {
|
result == ISC_R_RANGE) {
|
||||||
xfrout_log1(client, question_name, ISC_LOG_DEBUG(4),
|
xfrout_log1(client, question_name, ISC_LOG_DEBUG(4),
|
||||||
|
Reference in New Issue
Block a user