]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 14 Sep 2000 20:45:16 +0000 (20:45 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 14 Sep 2000 20:45:16 +0000 (20:45 +0000)
 456.   [bug]           Stub zones were not resetting the refresh and expire
                        counters, loadtime or clearing the DNS_ZONE_REFRESH
                        (refresh in progress) flag upon successful update.
                        This disabled further refreshing of the stub zone,
                        causing it to eventually expire. [RT #300]

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 9a7bcdbd53f417c3f3a5ff0f9d762d1c9ecd3ffb..004b24cee00c445ee8a5651f8c09826a3f4b9f95 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,10 @@
 
+ 456.  [bug]           Stub zones were not resetting the refresh and expire
+                       counters, loadtime or clearing the DNS_ZONE_REFRESH
+                       (refresh in progress) flag upon successful update.
+                       This disabled further refreshing of the stub zone,
+                       causing it to eventually expire. [RT #300]
+
        --- 9.0.0rc6 released ---
 
  453.  [bug]           Warn if the obsolete option "maintain-ixfr-base"
index 13e7b74f89bc9958eaa3b698235e7fb80dca4967..02d654d2513a8d3995620f041ddba9327bd6948d 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.152.2.11 2000/09/11 19:27:49 explorer Exp $ */
+/* $Id: zone.c,v 1.152.2.12 2000/09/14 20:45:16 gson Exp $ */
 
 #include <config.h>
 
@@ -2209,12 +2209,23 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
        UNLOCK(&zone->lock);
        dns_db_detach(&stub->db);
 
-       if (zone->dbname != NULL)
+       if (zone->dbname != NULL) {
                dns_zone_dump(zone);
+               (void)isc_time_now(&zone->loadtime);
+       }
 
        dns_message_destroy(&msg);
        isc_event_free(&event);
        dns_request_destroy(&zone->request);
+       LOCK(&zone->lock);
+       zone->flags &= ~DNS_ZONEFLG_REFRESH;
+       zone->refreshtime = now + zone->refresh;
+       zone->expiretime = now + zone->expire;
+       zone_log(zone, me, ISC_LOG_DEBUG(20),
+                "refresh time (%u/%u), now %u",
+                zone->refreshtime, zone->refresh, now);
+       zone_settimer(zone, now);
+       UNLOCK(&zone->lock);
        goto free_stub;
 
  next_master: