more verbose about server selection.

git-svn-id: file:///svn/unbound/trunk@1400 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-12-18 11:27:57 +00:00
parent 38d57b0f80
commit 159c7e4d6c
3 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@
some zones that had correct DLV keys as insecure.
- follows -rc makedist from ldns changes (no _rc).
- ldns tarball updated with 1.4.1rc for DLV unit test.
- verbose prints about recursion lame detection and server selection.
17 December 2008: Wouter
- follows ldns makedist.sh. -rc option. autom4te dir removed.

View file

@ -189,6 +189,11 @@ 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, qtype, &lame, &dnsseclame, &reclame,
&rtt, now)) {
log_addr(VERB_ALGO, "servselect", &a->addr, a->addrlen);
verbose(VERB_ALGO, " rtt=%d%s%s%s", rtt,
lame?" LAME":"",
dnsseclame?" DNSSEC_LAME":"",
reclame?" REC_LAME":"");
if(lame)
return -1; /* server is lame */
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT)
@ -297,13 +302,17 @@ iter_server_selection(struct iter_env* iter_env,
if(num == 0)
return NULL;
verbose(VERB_ALGO, "selrtt %d", selrtt);
if(selrtt > USEFUL_SERVER_TOP_TIMEOUT*2) {
verbose(VERB_ALGO, "chase to recursion lame server");
*chase_to_rd = 1;
}
if(selrtt > USEFUL_SERVER_TOP_TIMEOUT) {
verbose(VERB_ALGO, "chase to dnssec lame server");
*dnssec_expected = 0;
}
if(selrtt == USEFUL_SERVER_TOP_TIMEOUT) {
verbose(VERB_ALGO, "chase to blacklisted lame server");
/* the best choice is a blacklisted, unresponsive server,
* we need to throttle down our traffic towards it */
if(ub_random(env->rnd) % 100 != 1) {

View file

@ -1547,6 +1547,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
if(qstate->reply) {
/* need addr for lameness cache, but we may have
* gotten this from cache, so test to be sure */
verbose(VERB_DETAIL, "mark as REC_LAME");
if(!infra_set_lame(qstate->env->infra_cache,
&qstate->reply->addr, qstate->reply->addrlen,
iq->dp->name, iq->dp->namelen,