mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
1155. [func] Recover from master files being removed from under
us.
This commit is contained in:
parent
772ef7e815
commit
fefbb64a75
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
||||
1155. [func] Recover from master files being removed from under
|
||||
us.
|
||||
|
||||
1154. [bug] When scanning interfaces skip the interface
|
||||
if address no address is configured. [RT #2176]
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.c,v 1.354 2001/11/30 01:59:25 gson Exp $ */
|
||||
/* $Id: zone.c,v 1.355 2001/12/04 05:17:53 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -2222,6 +2222,7 @@ dump_done(void *arg, isc_result_t result) {
|
||||
switch (tresult) {
|
||||
case ISC_R_SUCCESS:
|
||||
case ISC_R_NOSPACE:
|
||||
case ISC_R_NOTFOUND:
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(3),
|
||||
"dns_journal_compact: %s",
|
||||
dns_result_totext(tresult));
|
||||
@ -3420,7 +3421,12 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
|
||||
} else if (isc_serial_eq(soa.serial, zone->serial)) {
|
||||
if (zone->masterfile != NULL) {
|
||||
result = isc_file_settime(zone->masterfile, &now);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
/* Someone removed the file from underneath us! */
|
||||
if (result == ISC_R_FILENOTFOUND) {
|
||||
LOCK_ZONE(zone);
|
||||
zone_needdump(zone, DNS_DUMP_DELAY);
|
||||
UNLOCK_ZONE(zone);
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"refresh: could not set file "
|
||||
"modification time of '%s': %s",
|
||||
@ -3945,6 +3951,13 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
|
||||
isc_time_compare(&zone->expiretime, &next) < 0)
|
||||
next = zone->expiretime;
|
||||
}
|
||||
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP) &&
|
||||
!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DUMPING)) {
|
||||
INSIST(!isc_time_isepoch(&zone->dumptime));
|
||||
if (isc_time_isepoch(&next) ||
|
||||
isc_time_compare(&zone->dumptime, &next) < 0)
|
||||
next = zone->dumptime;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -4857,7 +4870,11 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
|
||||
zone->masterfile != NULL)
|
||||
result = isc_file_settime(zone->masterfile,
|
||||
&now);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
/* Someone removed the file from underneath us! */
|
||||
if (result == ISC_R_FILENOTFOUND &&
|
||||
zone->masterfile != NULL)
|
||||
zone_needdump(zone, DNS_DUMP_DELAY);
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"transfer: could not set file "
|
||||
"modification time of '%s': %s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user