mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- 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%.
git-svn-id: file:///svn/unbound/trunk@2225 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
723a54f948
commit
8ec31ebbcc
2 changed files with 14 additions and 3 deletions
|
|
@ -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
|
20 August 2010: Wouter
|
||||||
- openbsd-lint fixes: acl_list_get_mem used if debug-alloc enabled.
|
- openbsd-lint fixes: acl_list_get_mem used if debug-alloc enabled.
|
||||||
iterator get_mem includes priv_get_mem. delegpt nodup removed.
|
iterator get_mem includes priv_get_mem. delegpt nodup removed.
|
||||||
|
|
|
||||||
|
|
@ -207,9 +207,15 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
|
||||||
if(lame)
|
if(lame)
|
||||||
return -1; /* server is lame */
|
return -1; /* server is lame */
|
||||||
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT &&
|
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT &&
|
||||||
lost >= USEFUL_SERVER_MAX_LOST)
|
lost >= USEFUL_SERVER_MAX_LOST) {
|
||||||
/* server is unresponsive, but keep trying slowly */
|
/* keep trying slowly, 1% of the time, because
|
||||||
return USEFUL_SERVER_TOP_TIMEOUT+1;
|
* 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 */
|
/* select remainder from worst to best */
|
||||||
else if(reclame)
|
else if(reclame)
|
||||||
return rtt+USEFUL_SERVER_TOP_TIMEOUT*3; /* nonpref */
|
return rtt+USEFUL_SERVER_TOP_TIMEOUT*3; /* nonpref */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue