mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-29 18:09:11 -04:00
reviewed: bwelling
1304. [bug] The RTT estimate on unused servers was not aged.
[RT #2569]
This commit is contained in:
parent
ecb325ac83
commit
c4610cb161
4 changed files with 31 additions and 5 deletions
3
CHANGES
3
CHANGES
|
|
@ -14,6 +14,9 @@
|
|||
1325. [bug] Document that internal zones are included in the
|
||||
rndc status results.
|
||||
|
||||
1304. [bug] The RTT estimate on unused servers was not aged.
|
||||
[RT #2569]
|
||||
|
||||
1302. [port] libbind: hpux 11.11 interface scaning.
|
||||
|
||||
1300. [bug] libbind: escape '(' and ')' when coverting to
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.181.2.2 2001/11/15 00:35:17 marka Exp $ */
|
||||
/* $Id: adb.c,v 1.181.2.3 2002/07/10 06:42:58 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation notes
|
||||
|
|
@ -3899,8 +3899,11 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
|||
bucket = addr->entry->lock_bucket;
|
||||
LOCK(&adb->entrylocks[bucket]);
|
||||
|
||||
new_srtt = (addr->entry->srtt / 10 * factor)
|
||||
+ (rtt / 10 * (10 - factor));
|
||||
if (factor == DNS_ADB_RTTADJAGE)
|
||||
new_srtt = addr->entry->srtt * 98 / 100;
|
||||
else
|
||||
new_srtt = (addr->entry->srtt / 10 * factor)
|
||||
+ (rtt / 10 * (10 - factor));
|
||||
|
||||
addr->entry->srtt = new_srtt;
|
||||
addr->srtt = new_srtt;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.h,v 1.66 2001/08/28 03:58:12 marka Exp $ */
|
||||
/* $Id: adb.h,v 1.66.2.1 2002/07/10 06:43:01 marka Exp $ */
|
||||
|
||||
#ifndef DNS_ADB_H
|
||||
#define DNS_ADB_H 1
|
||||
|
|
@ -483,6 +483,7 @@ dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
|
|||
*/
|
||||
#define DNS_ADB_RTTADJDEFAULT 7 /* default scale */
|
||||
#define DNS_ADB_RTTADJREPLACE 0 /* replace with our rtt */
|
||||
#define DNS_ADB_RTTADJAGE 10 /* age this rtt */
|
||||
|
||||
void
|
||||
dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.218.2.10 2002/04/19 01:11:16 marka Exp $ */
|
||||
/* $Id: resolver.c,v 1.218.2.11 2002/07/10 06:42:59 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -407,6 +407,25 @@ fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp,
|
|||
dns_adb_adjustsrtt(fctx->adb, query->addrinfo, rtt, factor);
|
||||
}
|
||||
|
||||
/*
|
||||
* Age RTTs of servers not tried.
|
||||
*/
|
||||
if (finish != NULL) {
|
||||
dns_adbfind_t *find;
|
||||
dns_adbaddrinfo_t *addrinfo;
|
||||
|
||||
factor = DNS_ADB_RTTADJAGE;
|
||||
for (find = ISC_LIST_HEAD(fctx->finds);
|
||||
find != NULL;
|
||||
find = ISC_LIST_NEXT(find, publink))
|
||||
for (addrinfo = ISC_LIST_HEAD(find->list);
|
||||
addrinfo != NULL;
|
||||
addrinfo = ISC_LIST_NEXT(addrinfo, publink))
|
||||
if (UNMARKED(addrinfo))
|
||||
dns_adb_adjustsrtt(fctx->adb, addrinfo,
|
||||
0, factor);
|
||||
}
|
||||
|
||||
if (query->dispentry != NULL)
|
||||
dns_dispatch_removeresponse(&query->dispentry, deventp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue