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

[or-cvs] r9841: Fix an infinite loop introduced in 0.1.2.7-alpha when we ser (in tor/trunk: . src/or)



Author: arma
Date: 2007-03-16 02:55:09 -0400 (Fri, 16 Mar 2007)
New Revision: 9841

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/dirserv.c
Log:
Fix an infinite loop introduced in 0.1.2.7-alpha when we serve
directory information requested inside Tor connections (i.e. via
begin_dir cells). It only triggered when the same connection was
serving other data at the same time. Reported by seeess.

Backport candidate.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-03-16 06:34:03 UTC (rev 9840)
+++ tor/trunk/ChangeLog	2007-03-16 06:55:09 UTC (rev 9841)
@@ -5,6 +5,12 @@
       in the network. Implements proposal 1xx, suggested by Kevin Bauer
       and Damon McCoy.
 
+  o Major bugfixes:
+    - Fix an infinite loop introduced in 0.1.2.7-alpha when we serve
+      directory information requested inside Tor connections (i.e. via
+      begin_dir cells). It only triggered when the same connection was
+      serving other data at the same time. Reported by seeess.
+
   o Minor features (build):
     - Make autoconf search for libevent and openssl consistently.
     - Update deprecated macros in configure.in

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2007-03-16 06:34:03 UTC (rev 9840)
+++ tor/trunk/src/or/dirserv.c	2007-03-16 06:55:09 UTC (rev 9841)
@@ -2093,8 +2093,8 @@
 {
   dir_connection_t *dir_conn, *next;
 
-  while (or_conn->blocked_dir_connections) {
-    dir_conn = or_conn->blocked_dir_connections;
+  dir_conn=or_conn->blocked_dir_connections;
+  while (dir_conn) {
     next = dir_conn->next_blocked_on_same_or_conn;
 
     dir_conn->is_blocked_on_or_conn = 0;