]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix auth-zone retry timer to be on schedule with retry timeout,
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 18 Apr 2018 06:43:02 +0000 (06:43 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 18 Apr 2018 06:43:02 +0000 (06:43 +0000)
  with backoff.  Also time a refresh at the zone expiry.

git-svn-id: file:///svn/unbound/trunk@4630 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/authzone.c

index 0480360e5f6f4c32511323137492e6248bbf8cf9..f53bcc96fd9ac8566c3a2fe45d37294247f37f7b 100644 (file)
@@ -1,3 +1,7 @@
+18 April 2018: Wouter
+       - Fix auth-zone retry timer to be on schedule with retry timeout,
+         with backoff.  Also time a refresh at the zone expiry.
+
 17 April 2018: Wouter
        - auth zone notify work.
        - allow-notify: config statement for auth-zones.
index f04483eb455d976d0e3d255d8ee791446290f6ea..a7141a1ef2ad242ee48033083e4618251ce26ff6 100644 (file)
@@ -5620,6 +5620,8 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env,
        struct auth_master* master = xfr_probe_current_master(xfr);
        if(!master) return 0;
        if(master->allow_notify) return 0; /* only for notify */
+       if(master->http) return 0; /* only masters get SOA UDP probe,
+               not urls, if those are in this list */
 
        /* get master addr */
        if(xfr->task_probe->scan_addr) {
@@ -6078,7 +6080,7 @@ xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
         * but if expiry is sooner, use that one.
         * after a failure, use the retry timer instead. */
        xfr->task_nextprobe->next_probe = *env->now;
-       if(xfr->lease_time)
+       if(xfr->lease_time && !failure)
                xfr->task_nextprobe->next_probe = xfr->lease_time;
        
        if(!failure) {
@@ -6101,6 +6103,12 @@ xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
                if(failure)
                        xfr->task_nextprobe->next_probe +=
                                xfr->task_nextprobe->backoff;
+               /* put the timer exactly on expiry, if possible */
+               if(xfr->lease_time && xfr->lease_time+xfr->expiry <
+                       xfr->task_nextprobe->next_probe &&
+                       xfr->lease_time+xfr->expiry > *env->now)
+                       xfr->task_nextprobe->next_probe =
+                               xfr->lease_time+xfr->expiry;
        } else {
                xfr->task_nextprobe->next_probe +=
                        xfr->task_nextprobe->backoff;