From: Wouter Wijngaards Date: Wed, 18 Apr 2018 06:43:02 +0000 (+0000) Subject: - Fix auth-zone retry timer to be on schedule with retry timeout, X-Git-Tag: release-1.7.1rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=913de80cbc77a56fcce14571a71fcd25d8b69d8b;p=thirdparty%2Funbound.git - Fix auth-zone retry timer to be on schedule with retry timeout, with backoff. Also time a refresh at the zone expiry. git-svn-id: file:///svn/unbound/trunk@4630 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 0480360e5..f53bcc96f 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/services/authzone.c b/services/authzone.c index f04483eb4..a7141a1ef 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -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;