diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2004-11-04 15:45:29 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2004-11-04 15:45:29 +0000 |
commit | 54259bcc71c8c1caeff93dcc9402c469a9c03bd8 (patch) | |
tree | f5c9afea18c30ea0a9f46f05de96368447746e8c /usr.sbin/bind/lib | |
parent | b22216d44ba91a9cb5506d3cb39972ae39c5127b (diff) |
adjust rtt estimates, fixes IPv6 problem.
Diffstat (limited to 'usr.sbin/bind/lib')
-rw-r--r-- | usr.sbin/bind/lib/dns/resolver.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/dns/resolver.c b/usr.sbin/bind/lib/dns/resolver.c index d74f4d308e7..c72f269c1b8 100644 --- a/usr.sbin/bind/lib/dns/resolver.c +++ b/usr.sbin/bind/lib/dns/resolver.c @@ -524,7 +524,7 @@ fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp, */ INSIST(no_response); rtt = query->addrinfo->srtt + - (100000 * fctx->restarts); + (200000 * fctx->restarts); if (rtt > 10000000) rtt = 10000000; /* @@ -791,7 +791,10 @@ resquery_senddone(isc_task_t *task, isc_event_t *event) { isc_socket_detach(&query->tcpsocket); resquery_destroy(&query); } - } else if (sevent->result != ISC_R_SUCCESS) + } else if (sevent->result == ISC_R_HOSTUNREACH || + sevent->result == ISC_R_NETUNREACH) + fctx_cancelquery(&query, NULL, NULL, ISC_TRUE); + else if (sevent->result != ISC_R_SUCCESS) fctx_cancelquery(&query, NULL, NULL, ISC_FALSE); isc_event_free(&event); @@ -1378,6 +1381,10 @@ resquery_connected(isc_task_t *task, isc_event_t *event) { ISC_FALSE); fctx_done(fctx, result); } + } else if (sevent->result == ISC_R_HOSTUNREACH || + sevent->result == ISC_R_NETUNREACH) { + isc_socket_detach(&query->tcpsocket); + fctx_cancelquery(&query, NULL, NULL, ISC_TRUE); } else { isc_socket_detach(&query->tcpsocket); fctx_cancelquery(&query, NULL, NULL, ISC_FALSE); |