summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-18 19:00:31 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-18 19:00:31 +0000
commit0be0f230ee0411b0c9f72757bb0554c0dfdb5c74 (patch)
tree30a6baa6fb014cde14a9e3473b2265ed65cb0e41
parenta258f9b594a5e039007036b2254ed6cec58ffcaa (diff)
downloadtor-0be0f230ee0411b0c9f72757bb0554c0dfdb5c74.tar.gz
tor-0be0f230ee0411b0c9f72757bb0554c0dfdb5c74.zip
r18942@catbus: nickm | 2008-03-18 15:00:09 -0400
Backport: Likely fix for bug 632: do not call start_reading on a placeholder connection. svn:r14110
-rw-r--r--ChangeLog3
-rw-r--r--src/or/relay.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f6807d7b9d..1b6cd87e74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ Changes in version 0.2.0.22-rc - 2008-03-17
- Do not enter a CPU-eating loop when a connection is closed in the middle
of client-side TLS renegotiation. Fixes bug 622. Bug diagnosed by
lodger.
+ - Fix assertion failure that could occur when a blocked circuit became
+ unblocked, and it had pending client DNS requests. Bugfix on
+ 0.2.0.1-alpha. Fixes bug 632.
o Minor bugfixes (on 0.1.2.x):
- Generate "STATUS_SERVER" events rather than misspelled
diff --git a/src/or/relay.c b/src/or/relay.c
index 4bbb0b5b71..91f7f167b6 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1811,6 +1811,12 @@ set_streams_blocked_on_circ(circuit_t *circ, or_connection_t *orconn,
connection_t *conn = TO_CONN(edge);
conn->edge_blocked_on_circ = block;
+ if (!conn->read_event) {
+ /* This connection is a placeholder for something; probably a DNS
+ * request. It can't actually stop or start reading.*/
+ continue;
+ }
+
if (block) {
if (connection_is_reading(conn))
connection_stop_reading(conn);