]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use-alt-transfer-source when the master refused soa queries. [RT #5528]
authorMark Andrews <marka@isc.org>
Tue, 22 Apr 2003 04:03:25 +0000 (04:03 +0000)
committerMark Andrews <marka@isc.org>
Tue, 22 Apr 2003 04:03:25 +0000 (04:03 +0000)
lib/dns/zone.c

index c61039f5e198740dc63b52f111bba5dec0361af6..df06a06b4ce08335adf3d6f75709edcf6ee13731 100644 (file)
@@ -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 <config.h>
 
@@ -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;