From 64655588e754bed8df145b1e963fe39df3680ce7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 22 Apr 2003 04:03:25 +0000 Subject: [PATCH] use-alt-transfer-source when the master refused soa queries. [RT #5528] --- lib/dns/zone.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index c61039f5e1..df06a06b4c 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.387 2003/04/17 12:11:39 marka Exp $ */ +/* $Id: zone.c,v 1.388 2003/04/22 04:03:25 marka Exp $ */ #include @@ -3620,15 +3620,24 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { zone->curmaster++; DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS); if (zone->curmaster >= zone->masterscnt) { + if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) && + !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) { + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC); + zone->curmaster = 0; + goto requeue; + } DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH); if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDREFRESH)) { DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDREFRESH); zone->refreshtime = now; } + DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC); zone_settimer(zone, &now); UNLOCK_ZONE(zone); goto detach; } + + requeue: queue_soa_query(zone); UNLOCK_ZONE(zone); goto detach;