+19 October 2010: Wouter
+ - Fix for request list growth, if a server has long timeout but the
+ lost counter is low, then its effective rtt is the one without
+ exponential backoff applied. Because the backoff is not working.
+ The lost counter can then increase and the server is blacklisted,
+ or the lost counter does not increase and the server is working
+ for some queries.
+
18 October 2010: Wouter
- iana portlist updated.
return -1; /* server is lame */
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT &&
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 USEFUL_SERVER_TOP_TIMEOUT;
}
#include "util/log.h"
#include "util/net_help.h"
#include "util/config_file.h"
+#include "iterator/iterator.h"
size_t
infra_host_sizefunc(void* k, void* ATTR_UNUSED(d))
/* use existing entry */
data = (struct infra_host_data*)e->data;
*to = rtt_timeout(&data->rtt);
+ if(*to >= USEFUL_SERVER_TOP_TIMEOUT &&
+ data->num_timeouts < USEFUL_SERVER_MAX_LOST)
+ /* use smaller timeout, backoff does not work
+ * The server seems to still reply but sporadically.
+ * Perhaps it has rate-limited the traffic, or it
+ * drops particular queries (AAAA). ignore timeouts,
+ * but we use an expanded variance of 6x. */
+ *to = data->rtt.srtt + 6*data->rtt.rttvar;
*edns_vs = data->edns_version;
*edns_lame_known = data->edns_lame_known;
lock_rw_unlock(&e->lock);