3274. [bug] Log when a zone is not reusable. Only set loadtime
on successful loads. [RT #27650]
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
3274. [bug] Log when a zone is not reusable. Only set loadtime
|
||||
on successful loads. [RT #27650]
|
||||
|
||||
3273. [bug] AAAA responses could be returned in the additional
|
||||
section even when filter-aaaa-on-v4 was in use.
|
||||
[RT #27292]
|
||||
|
||||
+14
-5
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.c,v 1.170.14.5 2011/12/20 00:12:10 marka Exp $ */
|
||||
/* $Id: zoneconf.c,v 1.170.14.6 2012/01/31 22:31:46 marka Exp $ */
|
||||
|
||||
/*% */
|
||||
|
||||
@@ -1465,15 +1465,21 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
|
||||
|
||||
zoptions = cfg_tuple_get(zconfig, "options");
|
||||
|
||||
if (zonetype_fromconfig(zoptions) != dns_zone_gettype(zone))
|
||||
if (zonetype_fromconfig(zoptions) != dns_zone_gettype(zone)) {
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(1),
|
||||
"not reusable: type mismatch");
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* We always reconfigure a static-stub zone for simplicity, assuming
|
||||
* the amount of data to be loaded is small.
|
||||
*/
|
||||
if (zonetype_fromconfig(zoptions) == dns_zone_staticstub)
|
||||
if (zonetype_fromconfig(zoptions) == dns_zone_staticstub) {
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(1),
|
||||
"not reusable: staticstub");
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
(void)cfg_map_get(zoptions, "file", &obj);
|
||||
@@ -1484,8 +1490,11 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
|
||||
zfilename = dns_zone_getfile(zone);
|
||||
if (!((cfilename == NULL && zfilename == NULL) ||
|
||||
(cfilename != NULL && zfilename != NULL &&
|
||||
strcmp(cfilename, zfilename) == 0)))
|
||||
return (ISC_FALSE);
|
||||
strcmp(cfilename, zfilename) == 0))) {
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(1),
|
||||
"not reusable: filename mismatch");
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
+3
-4
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.c,v 1.582.8.41 2012/01/30 00:17:23 marka Exp $ */
|
||||
/* $Id: zone.c,v 1.582.8.42 2012/01/31 22:31:46 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -3397,9 +3397,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
||||
needdump = ISC_TRUE;
|
||||
}
|
||||
|
||||
zone->loadtime = loadtime;
|
||||
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(1), "loaded");
|
||||
dns_zone_log(zone, ISC_LOG_DEBUG(1), "loaded; checking validity");
|
||||
/*
|
||||
* Obtain ns, soa and cname counts for top of zone.
|
||||
*/
|
||||
@@ -3644,6 +3642,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
||||
dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u%s", serial,
|
||||
dns_db_issecure(db) ? " (DNSSEC signed)" : "");
|
||||
|
||||
zone->loadtime = loadtime;
|
||||
return (result);
|
||||
|
||||
cleanup:
|
||||
|
||||
Reference in New Issue
Block a user