]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix timeouts so that when a server has been offline for a while
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Aug 2012 07:17:48 +0000 (07:17 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Aug 2012 07:17:48 +0000 (07:17 +0000)
  and is probed to see it works, it becomes fully available for
  server selection again.

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

doc/Changelog
services/cache/infra.c

index d7a624114af358c8df7b9b2fb76a3fdd2d2920d0..92016ea67edc474b54ecffa3eaa70c1c24d7dd70 100644 (file)
@@ -1,3 +1,8 @@
+21 August 2012: Wouter
+       - Fix timeouts so that when a server has been offline for a while
+         and is probed to see it works, it becomes fully available for
+         server selection again.
+
 17 August 2012: Wouter
        - Add documentation to libunbound for default nonuse of resolv.conf.
 
index dbbd50326e591e8fc5fb6f2e4219ec47d5b53247..c674aca6675477eb37c6250a2ac3eab2f36d860e 100644 (file)
@@ -403,6 +403,11 @@ infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
                                data->timeout_other++;
                }
        } else {
+               /* if we got a reply, but the old timeout was above server
+                * selection height, delete the timeout so the server is
+                * fully available again */
+               if(rtt_unclamped(&data->rtt) >= USEFUL_SERVER_TOP_TIMEOUT)
+                       rtt_init(&data->rtt);
                rtt_update(&data->rtt, roundtrip);
                data->probedelay = 0;
                if(qtype == LDNS_RR_TYPE_A)