[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] bugfix: discourage picking directory authorities as our Tes...
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: discourage picking directory authorities as our TestVia
hops, even if they're running the right versions, since we probably
already have a connection established to them.
Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -p -d -r1.246 -r1.247
--- circuitbuild.c 13 Jun 2006 12:57:19 -0000 1.246
+++ circuitbuild.c 14 Jun 2006 11:06:43 -0000 1.247
@@ -1459,7 +1459,8 @@ onion_append_to_cpath(crypt_path_t **hea
/** Pick a random server digest that's running a Tor version that
* doesn't have the reachability bug. These are versions 0.1.1.22+
- * and 0.1.2.1-alpha+.
+ * and 0.1.2.1-alpha+. Avoid picking authorities, since we're
+ * probably already connected to them.
*
* We only return one, so this doesn't become stupid when the
* whole network has upgraded. */
@@ -1480,7 +1481,8 @@ compute_preferred_testing_list(const cha
if (r->is_running && r->is_valid &&
((tor_version_as_new_as(r->platform,"0.1.1.21-cvs") &&
!tor_version_as_new_as(r->platform,"0.1.2.0-alpha-cvs")) ||
- tor_version_as_new_as(r->platform,"0.1.2.1-alpha")))
+ tor_version_as_new_as(r->platform,"0.1.2.1-alpha")) &&
+ !router_get_trusteddirserver_by_digest(r->cache_info.identity_digest))
smartlist_add(choices, r));
router = smartlist_choose(choices);
smartlist_free(choices);