dns_difftuple_t *t;
isc_buffer_t buffer;
void *mem = NULL;
- size_t size;
+ isc_uint64_t size;
isc_result_t result;
isc_region_t used;
}
if (size >= DNS_JOURNAL_SIZE_MAX) {
- return (ISC_R_RANGE);
+ isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+ "dns_journal_writediff: %s: journal entry "
+ "too big to be stored: %llu bytes", j->filename,
+ size);
+ return (ISC_R_NOSPACE);
}
mem = isc_mem_get(j->mctx, size);
dns_journal_commit(dns_journal_t *j) {
isc_result_t result;
journal_rawheader_t rawheader;
+ isc_uint64_t total;
REQUIRE(DNS_JOURNAL_VALID(j));
REQUIRE(j->state == JOURNAL_STATE_TRANSACTION ||
/*
* We currently don't support huge journal entries.
*/
- unsigned long long total = j->x.pos[1].offset - j->x.pos[0].offset;
+ total = j->x.pos[1].offset - j->x.pos[0].offset;
if (total >= DNS_JOURNAL_SIZE_MAX) {
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
- "transaction too big to be stored in journal :"
+ "transaction too big to be stored in journal: "
"%llub (max is %llub)", total,
- (unsigned long long)DNS_JOURNAL_SIZE_MAX);
+ (isc_uint64_t)DNS_JOURNAL_SIZE_MAX);
return (ISC_R_UNEXPECTED);
}
result = dns_db_diff(zone->mctx, db, ver, zone->db, NULL,
zone->journal);
- if (result == ISC_R_RANGE) {
+ if (result != ISC_R_SUCCESS) {
+ char strbuf[ISC_STRERRORSIZE];
+ isc__strerror(errno, strbuf, sizeof(strbuf));
dns_zone_log(zone, ISC_LOG_ERROR,
"ixfr-from-differences: failed: "
- "difference too big to be stored "
- "in journal");
- goto fail;
+ "%s", strbuf);
+ goto fallback;
}
- if (result != ISC_R_SUCCESS)
- goto fail;
if (dump)
zone_needdump(zone, DNS_DUMP_DELAY);
else if (zone->journalsize != -1) {
if (zone->type == dns_zone_master && inline_raw(zone))
zone_send_secureserial(zone, serial);
} else {
+ fallback:
if (dump && zone->masterfile != NULL) {
/*
* If DNS_ZONEFLG_FORCEXFER was set we don't want