[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r14110: Backport: Likely fix for bug 632: do not call start_reading (in tor/branches/tor-0_2_0-patches: . src/or)



Author: nickm
Date: 2008-03-18 15:00:31 -0400 (Tue, 18 Mar 2008)
New Revision: 14110

Modified:
   tor/branches/tor-0_2_0-patches/
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/or/relay.c
Log:
 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.



Property changes on: tor/branches/tor-0_2_0-patches
___________________________________________________________________
 svk:merge ticket from /tor/020 [r18942] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-18 19:00:12 UTC (rev 14109)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-18 19:00:31 UTC (rev 14110)
@@ -11,6 +11,9 @@
     - 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

Modified: tor/branches/tor-0_2_0-patches/src/or/relay.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/relay.c	2008-03-18 19:00:12 UTC (rev 14109)
+++ tor/branches/tor-0_2_0-patches/src/or/relay.c	2008-03-18 19:00:31 UTC (rev 14110)
@@ -1811,6 +1811,12 @@
     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);