]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2957. [bug] RTT estimates were not being adjusted on ICMP errors.
authorMark Andrews <marka@isc.org>
Thu, 4 Mar 2010 06:43:21 +0000 (06:43 +0000)
committerMark Andrews <marka@isc.org>
Thu, 4 Mar 2010 06:43:21 +0000 (06:43 +0000)
                        [RT #20772]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 803f3a93746efbb9bf47f75d4e63fb93f0f49f6b..c4a232dc7a60a03b1c9ec07cd687345ac8fbde7a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2957.  [bug]           RTT estimates were not being adjusted on ICMP errors.
+                       [RT #20772]
+
 2956.  [bug]           named-checkconf did not fail on a bad trusted key.
                        [RT #20705]
 
index 8e038162c44a9434a35f93e67dd1cf0e7399df58..41d022d8dd70a31974d2df93eba2e07e5e6b83a2 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.417 2010/02/25 05:08:01 tbox Exp $ */
+/* $Id: resolver.c,v 1.418 2010/03/04 06:43:21 marka Exp $ */
 
 /*! \file */
 
@@ -6412,6 +6412,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        unsigned int findoptions;
        isc_result_t broken_server;
        badnstype_t broken_type = badns_response;
+       isc_boolean_t no_response;
 
        REQUIRE(VALID_QUERY(query));
        fctx = query->fctx;
@@ -6434,6 +6435,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        resend = ISC_FALSE;
        truncated = ISC_FALSE;
        finish = NULL;
+       no_response = ISC_FALSE;
 
        if (fctx->res->exiting) {
                result = ISC_R_SHUTTINGDOWN;
@@ -6482,7 +6484,9 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        /*
                         * If this is a network error on an exclusive query
                         * socket, mark the server as bad so that we won't try
-                        * it for this fetch again.
+                        * it for this fetch again.  Also adjust finish and
+                        * no_response so that we penalize this address in SRTT
+                        * adjustment later.
                         */
                        if (query->exclusivesocket &&
                            (devent->result == ISC_R_HOSTUNREACH ||
@@ -6491,6 +6495,8 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                             devent->result == ISC_R_CANCELED)) {
                                    broken_server = devent->result;
                                    broken_type = badns_unreachable;
+                                   finish = NULL;
+                                   no_response = ISC_TRUE;
                        }
                }
                goto done;
@@ -6993,7 +6999,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
         *
         * XXXRTH  Don't cancel the query if waiting for validation?
         */
-       fctx_cancelquery(&query, &devent, finish, ISC_FALSE);
+       fctx_cancelquery(&query, &devent, finish, no_response);
 
        if (keep_trying) {
                if (result == DNS_R_FORMERR)