mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
1155. [func] Recover from master files being removed from under
us.
This commit is contained in:
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
|
1154. [bug] When scanning interfaces skip the interface
|
||||||
if address no address is configured. [RT #2176]
|
if address no address is configured. [RT #2176]
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -2222,6 +2222,7 @@ dump_done(void *arg, isc_result_t result) {
|
|||||||
switch (tresult) {
|
switch (tresult) {
|
||||||
case ISC_R_SUCCESS:
|
case ISC_R_SUCCESS:
|
||||||
case ISC_R_NOSPACE:
|
case ISC_R_NOSPACE:
|
||||||
|
case ISC_R_NOTFOUND:
|
||||||
dns_zone_log(zone, ISC_LOG_DEBUG(3),
|
dns_zone_log(zone, ISC_LOG_DEBUG(3),
|
||||||
"dns_journal_compact: %s",
|
"dns_journal_compact: %s",
|
||||||
dns_result_totext(tresult));
|
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)) {
|
} else if (isc_serial_eq(soa.serial, zone->serial)) {
|
||||||
if (zone->masterfile != NULL) {
|
if (zone->masterfile != NULL) {
|
||||||
result = isc_file_settime(zone->masterfile, &now);
|
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,
|
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||||
"refresh: could not set file "
|
"refresh: could not set file "
|
||||||
"modification time of '%s': %s",
|
"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)
|
isc_time_compare(&zone->expiretime, &next) < 0)
|
||||||
next = zone->expiretime;
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -4857,7 +4870,11 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
|
|||||||
zone->masterfile != NULL)
|
zone->masterfile != NULL)
|
||||||
result = isc_file_settime(zone->masterfile,
|
result = isc_file_settime(zone->masterfile,
|
||||||
&now);
|
&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,
|
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||||
"transfer: could not set file "
|
"transfer: could not set file "
|
||||||
"modification time of '%s': %s",
|
"modification time of '%s': %s",
|
||||||
|
Reference in New Issue
Block a user