[or-cvs] r18683: {tor} Fix one case of bug 929. (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Mon Feb 23 20:04:51 UTC 2009


Author: nickm
Date: 2009-02-23 15:04:51 -0500 (Mon, 23 Feb 2009)
New Revision: 18683

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/eventdns.c
Log:
Fix one case of bug 929.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-02-23 18:57:21 UTC (rev 18682)
+++ tor/trunk/ChangeLog	2009-02-23 20:04:51 UTC (rev 18683)
@@ -32,6 +32,10 @@
       circuit.  Patch from lark.
     - When we erroneously receive two EXTEND cells for the same circuit ID
       on the same connection, drop the second.  Patch from lark.
+    - Fix a crash that occurs on exit nodes when a nameserver request
+      timed out.  Bugfix on 0.1.2.1-alpha; our CLEAR debugging code
+      had been suppressing the bug since 0.1.2.10-alpha.  Partial fix
+      for bug 929.
 
   o Minor features:
     - On Linux, use the prctl call to re-enable core dumps when the user

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2009-02-23 18:57:21 UTC (rev 18682)
+++ tor/trunk/src/or/eventdns.c	2009-02-23 20:04:51 UTC (rev 18683)
@@ -2016,14 +2016,17 @@
 		nameserver_failed(req->ns, "request timed out.");
 	}
 
-	del_timeout_event(req);
-	CLEAR(&req->timeout_event);
 	if (req->tx_count >= global_max_retransmits) {
 		/* this request has failed */
 		reply_callback(req, 0, DNS_ERR_TIMEOUT, NULL);
 		request_finished(req, &req_head);
 	} else {
 		/* retransmit it */
+		/* Stop waiting for the timeout.  No need to do this in
+		 * request_finished; that one already deletes the timeout event.
+		 * XXXX021 port this change to libevent. */
+		del_timeout_event(req);
+		CLEAR(&req->timeout_event);
 		evdns_request_transmit(req);
 	}
 }



More information about the tor-commits mailing list