+
+ 490. [func] When a slave/stub zone has not yet successfully
+ obtained an SOA containing the zone's configured
+ retry time, perform the SOA query retries using
+ exponential backoff. [RT #337]
+
489. [func] The zone manager now has a "i/o" queue.
488. [bug] Locks weren't properly destroyed in some cases.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.76 2000/09/26 17:24:00 gson Exp $ */
+/* $Id: zone.h,v 1.77 2000/09/26 18:17:10 gson Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
#define DNS_ZONE_MAXRETRY 1209600 /* 2 weeks */
#endif
#ifndef DNS_ZONE_DEFAULTRETRY
-#define DNS_ZONE_DEFAULTRETRY 1800 /* 30 minutes */
+#define DNS_ZONE_DEFAULTRETRY 60 /* 1 minute, subject to
+ exponential backoff */
#endif
ISC_LANG_BEGINDECLS
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.221 2000/09/26 17:28:13 gson Exp $ */
+/* $Id: zone.c,v 1.222 2000/09/26 18:17:09 gson Exp $ */
#include <config.h>
* zone with no masters
* occured */
#define DNS_ZONEFLG_LOADING 0x00002000U /* load from disk in progress */
+#define DNS_ZONEFLG_HAVETIMERS 0x00004000U /* timer values have been set from
+ SOA (if not set, we are still using
+ default timer values) */
#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
zone->minretry, zone->maxretry);
zone->expire = RANGE(expire, zone->refresh + zone->retry,
DNS_MAX_EXPIRE);
-
zone->minimum = minimum;
+ zone->flags |= DNS_ZONEFLG_HAVETIMERS;
+
if (zone->type == dns_zone_slave ||
zone->type == dns_zone_stub) {
isc_time_t t;
zone->flags |= DNS_ZONEFLG_EXPIRED;
zone->refresh = DNS_ZONE_DEFAULTREFRESH;
zone->retry = DNS_ZONE_DEFAULTRETRY;
+ zone->flags &= ~DNS_ZONEFLG_HAVETIMERS;
zone_unload(zone);
}
"refresh time (%u/%u), now %u",
zone->refreshtime, zone->refresh, now);
+ /*
+ * When lacking user-specified timer values from the SOA,
+ * do exponential backoff of the retry time up to a
+ * maximum of six hours.
+ */
+ if (! DNS_ZONE_FLAG(zone, DNS_ZONEFLG_HAVETIMERS))
+ zone->retry = ISC_MIN(zone->retry * 2, 6 * 3600);
+
zone->curmaster = 0;
/* initiate soa query */
queue_soa_query(zone);
return;
}
+/*
+ * An SOA query has finished (successfully or not).
+ */
static void
refresh_callback(isc_task_t *task, isc_event_t *event) {
const char me[] = "refresh_callback";
zone->refresh + zone->retry,
DNS_MAX_EXPIRE);
zone->minimum = minimum;
+ zone->flags |= DNS_ZONEFLG_HAVETIMERS;
}
/*