]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- unresponsive servers are not completely blacklisted (because of
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 9 Sep 2010 14:56:51 +0000 (14:56 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 9 Sep 2010 14:56:51 +0000 (14:56 +0000)
         firewalls), but also not probed all the time (because of the request
            list size it generates).  The probe rate is 1%.

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

doc/Changelog
iterator/iter_utils.c

index df5a52f423292da4b073b61f82a0fbae4983a400..495d0d9c6f37ad87b7c2b9779a766602b85b90e7 100644 (file)
@@ -1,3 +1,8 @@
+9 September 2010: Wouter
+       - unresponsive servers are not completely blacklisted (because of
+         firewalls), but also not probed all the time (because of the request
+         list size it generates).  The probe rate is 1%.
+
 20 August 2010: Wouter
        - openbsd-lint fixes: acl_list_get_mem used if debug-alloc enabled.
          iterator get_mem includes priv_get_mem.  delegpt nodup removed.
index f01aea633c082358b21688af3d99312a123412e5..a5560653426cc71c25a75ad009a95eb8c7be8f42 100644 (file)
@@ -207,9 +207,15 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
                if(lame)
                        return -1; /* server is lame */
                else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT && 
-                       lost >= USEFUL_SERVER_MAX_LOST)
-                       /* server is unresponsive, but keep trying slowly */
-                       return USEFUL_SERVER_TOP_TIMEOUT+1;
+                       lost >= USEFUL_SERVER_MAX_LOST) {
+                       /* keep trying slowly, 1% of the time, because
+                        * this can be due to weird firewalls.  This number
+                        * does not have to be securely random. */
+                       if(ub_random(env->rnd) % 100 == 0)
+                               return USEFUL_SERVER_TOP_TIMEOUT+1;
+                       /* server is unresponsive */
+                       return -1;
+               }
                /* select remainder from worst to best */
                else if(reclame)
                        return rtt+USEFUL_SERVER_TOP_TIMEOUT*3; /* nonpref */