[or-cvs] bugfix: if we are making our first ever connection to any e...

arma at seul.org arma at seul.org
Mon Jun 5 08:58:20 UTC 2006


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c 
Log Message:
bugfix: if we are making our first ever connection to any entry
guard, then don't mark it down at first. we had this implemented
but it was disabled due to a bug.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -p -d -r1.236 -r1.237
--- circuitbuild.c	5 Jun 2006 07:27:48 -0000	1.236
+++ circuitbuild.c	5 Jun 2006 08:58:18 -0000	1.237
@@ -707,7 +707,7 @@ circuit_extend(cell_t *cell, circuit_t *
   if (!n_conn || n_conn->state != OR_CONN_STATE_OPEN ||
     (n_conn->is_obsolete &&
      router_digest_version_as_new_as(id_digest,"0.1.1.9-alpha-cvs"))) {
-     /* Note that this will close circuits where the onion has the same
+     /* Note that this will close circuits that have the same
      * router twice in a row in the path. I think that's ok.
      */
     struct in_addr in;
@@ -2015,6 +2015,8 @@ entry_guard_set_status(const char *diges
             SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e,
               {
                 routerinfo_t *r;
+                if (e == entry)
+                  break;
                 if (e->made_contact) {
                   e->down_since = 0;
                   r = entry_is_live(e, 0, 1);
@@ -2023,8 +2025,6 @@ entry_guard_set_status(const char *diges
                     r->is_running = 1;
                   }
                 }
-                if (e == entry)
-                  break;
               });
             log_info(LD_CIRC,
                      "Connected to new entry guard '%s'. Marking earlier "



More information about the tor-commits mailing list