]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
cvs rdiff -r1.3417 -r1.3418 bind9/CHANGES
authorMark Andrews <marka@isc.org>
Thu, 24 Jun 2010 07:29:07 +0000 (07:29 +0000)
committerMark Andrews <marka@isc.org>
Thu, 24 Jun 2010 07:29:07 +0000 (07:29 +0000)
cvs rdiff -r1.330 -r1.331 bind9/bin/dig/dighost.c

CHANGES
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index e31d4e615af6629d716b1f6c59dac97ff705aa91..d9b0c463c23f5f0bcf7a28b13c5a8cb7a637eaba 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2922.  [bug]           'dig +trace' could drop core after "connection
+                       timeout". [RT #21514]
+
 2922.  [contrib]       Update zkt to version 1.0.
 
 2921.  [bug]           The resolver could attempt to destroy a fetch context
index 7800edc8d139340e5b565fe1df03ca55c3f4499d..3755aac6294a74619551b1671e34ec344738c16c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.328.22.2 2010/05/18 02:35:11 tbox Exp $ */
+/* $Id: dighost.c,v 1.328.22.3 2010/06/24 07:29:07 marka Exp $ */
 
 /*! \file
  *  \note
@@ -2401,6 +2401,15 @@ force_timeout(dig_lookup_t *l, dig_query_t *query) {
                      isc_result_totext(ISC_R_NOMEMORY));
        }
        isc_task_send(global_task, &event);
+
+       /*
+        * The timer may have expired if, for example, get_address() takes
+        * long time and the timer was running on a different thread.
+        * We need to cancel the possible timeout event not to confuse
+        * ourselves due to the duplicate events.
+        */
+       if (l->timer != NULL)
+               isc_timer_detach(&l->timer);
 }
 
 
@@ -2424,7 +2433,7 @@ send_tcp_connect(dig_query_t *query) {
        query->waiting_connect = ISC_TRUE;
        query->lookup->current_query = query;
        result = get_address(query->servname, port, &query->sockaddr);
-       if (result == ISC_R_NOTFOUND) {
+       if (result != ISC_R_SUCCESS) {
                /*
                 * This servname doesn't have an address.  Try the next server
                 * by triggering an immediate 'timeout' (we lie, but the effect
@@ -2506,7 +2515,7 @@ send_udp(dig_query_t *query) {
                /* XXX Check the sense of this, need assertion? */
                query->waiting_connect = ISC_FALSE;
                result = get_address(query->servname, port, &query->sockaddr);
-               if (result == ISC_R_NOTFOUND) {
+               if (result != ISC_R_SUCCESS) {
                        /* This servname doesn't have an address. */
                        force_timeout(l, query);
                        return;