mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
Do not select servers that are known to not give replies.
git-svn-id: file:///svn/unbound/trunk@427 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
5a66104adb
commit
959088280f
@ -2,6 +2,11 @@
|
||||
- delete of mesh does a postorder traverse of the tree.
|
||||
- found and fixed a memory leak. For TTL=0 messages, that would
|
||||
not be cached, instead the msg-replyinfo structure was leaked.
|
||||
- changed server selection so it will filter out hosts that are
|
||||
unresponsive. This is defined as a host with the maximum rto value.
|
||||
This means that unbound tried the host for retries up to 120 secs.
|
||||
The rto value will time out after host-ttl seconds from the cache.
|
||||
This keeps such unresolvable queries from taking up resources.
|
||||
|
||||
26 June 2007: Wouter
|
||||
- mesh is called by worker, and iterator uses it.
|
||||
|
@ -161,8 +161,10 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
|
||||
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
|
||||
name, namelen, &lame, &rtt, now)) {
|
||||
if(lame)
|
||||
return -1;
|
||||
else return rtt;
|
||||
return -1; /* server is lame */
|
||||
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT)
|
||||
return -1; /* server is unresponsive */
|
||||
else return rtt;
|
||||
}
|
||||
/* no server information present */
|
||||
return UNKNOWN_SERVER_NICENESS;
|
||||
|
@ -53,8 +53,15 @@ struct iter_prep_list;
|
||||
#define MAX_RESTART_COUNT 8
|
||||
/** max number of referrals. Makes sure resolver does not run away */
|
||||
#define MAX_REFERRAL_COUNT 30
|
||||
/** how nice is a server without further information, in msec */
|
||||
/** how nice is a server without further information, in msec
|
||||
* Equals rtt initial timeout value.
|
||||
*/
|
||||
#define UNKNOWN_SERVER_NICENESS 3000
|
||||
/** maximum timeout before a host is deemed unsuitable, in msec.
|
||||
* After host_ttl this will be timed out and the host will be tried again.
|
||||
* Equals RTT_MAX_TIMEOUT
|
||||
*/
|
||||
#define USEFUL_SERVER_TOP_TIMEOUT 120000
|
||||
|
||||
/**
|
||||
* Global state for the iterator.
|
||||
|
Loading…
Reference in New Issue
Block a user