Commit edee9a8a authored by Bob Halley's avatar Bob Halley
Browse files

If we discover a server is broken for a zone, don't talk to it for 10

minutes.
parent 37300957
......@@ -867,10 +867,6 @@ fctx_nextaddress(fetchctx_t *fctx) {
fctx->find = find;
/* XXX */
if (addrinfo != NULL)
printf("RTT = %u\n", addrinfo->srtt);
return (addrinfo);
}
......@@ -2365,6 +2361,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
dns_fixedname_t foundname;
isc_stdtime_t now;
isc_time_t tnow, *finish;
dns_adbaddrinfo_t *addrinfo;
REQUIRE(VALID_QUERY(query));
fctx = query->fctx;
......@@ -2539,6 +2536,12 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
}
done:
/*
* Remember the query's addrinfo, in case we need to mark the
* server as broken.
*/
addrinfo = query->addrinfo;
/*
* Cancel the query.
*/
......@@ -2548,25 +2551,21 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
if (result == DNS_R_FORMERR)
broken_server = ISC_TRUE;
if (broken_server) {
#ifdef notyet
result = dns_adb_marklame(dns_adb_t *adb,
dns_adbaddrinfo_t *addr,
dns_name_t *zone,
isc_stdtime_t expire_time);
#else
/*
* XXXRTH Replace "600" with a configurable
* value.
*/
result = dns_adb_marklame(fctx->res->view->adb,
addrinfo,
&fctx->domain,
now + 600);
result = ISC_R_SUCCESS;
#endif
if (result != ISC_R_SUCCESS) {
fctx_done(fctx, result);
return;
}
}
/*
* XXXRTH If we have a broken server at this point, we will
* decrease its 'goodness', possibly add a 'lame'
* entry, and maybe log a message.
*/
if (get_nameservers) {
dns_fixedname_init(&foundname);
fname = dns_fixedname_name(&foundname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment