aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-23 20:04:51 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-23 20:04:51 +0000
commit27c3b43817d1c150049437a8906785a4fee0814f (patch)
tree41e088047ae3a446eacdae7e5b0801667ea5d6ac
parentc7f3416a9e24b140e5119dc727885a739f68cb5b (diff)
downloadtor-27c3b43817d1c150049437a8906785a4fee0814f.tar
tor-27c3b43817d1c150049437a8906785a4fee0814f.tar.gz
Fix one case of bug 929.
svn:r18683
-rw-r--r--ChangeLog4
-rw-r--r--src/or/eventdns.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fa2037c4c..efd4b3535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,10 @@ Changes in version 0.2.1.13-????? - 2009-02-??
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
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 4c50a109f..63851483f 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -2016,14 +2016,17 @@ evdns_request_timeout_callback(int fd, short events, void *arg) {
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);
}
}