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

[or-cvs] r16409: Take out the TestVia config option, since it was a workaroun (in tor/trunk: . doc src/or)



Author: arma
Date: 2008-08-04 20:12:05 -0400 (Mon, 04 Aug 2008)
New Revision: 16409

Modified:
   tor/trunk/ChangeLog
   tor/trunk/doc/tor.1.in
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/or.h
Log:
Take out the TestVia config option, since it was a workaround for
a bug that was fixed in Tor 0.1.1.21.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-08-05 00:00:35 UTC (rev 16408)
+++ tor/trunk/ChangeLog	2008-08-05 00:12:05 UTC (rev 16409)
@@ -15,7 +15,11 @@
       complaining that it has become obsolete. Observed by xiando. Bugfix
       on 0.2.1.3-alpha.
 
+  o Removed features:
+    - Take out the TestVia config option, since it was a workaround for
+      a bug that was fixed in Tor 0.1.1.21.
 
+
 Changes in version 0.2.1.3-alpha - 2008-08-03
   o Bootstrapping bugfixes (on 0.2.1.x-alpha):
     - Send a bootstrap problem "warn" event on the first problem if the
@@ -78,7 +82,7 @@
       is getting torn down, generate the stream event correctly.
       Bugfix on 0.1.2.x. Anonymous patch.
 
-  o Removed features
+  o Removed features:
     - Remove all backward-compatibility code to support relays running
       versions of Tor so old that they no longer work at all on the
       Tor network.

Modified: tor/trunk/doc/tor.1.in
===================================================================
--- tor/trunk/doc/tor.1.in	2008-08-05 00:00:35 UTC (rev 16408)
+++ tor/trunk/doc/tor.1.in	2008-08-05 00:12:05 UTC (rev 16409)
@@ -576,12 +576,6 @@
 (Default: 2 minutes.)
 .LP
 .TP
-\fBTestVia \fR\fInode\fR,\fInode\fR,\fI...\fP
-A list of identity fingerprints or nicknames of nodes to prefer for your middle
-hop when building testing circuits. This option is mainly for debugging
-reachability problems.
-.LP
-.TP
 \fBTrackHostExits \fR\fIhost\fR,\fI.domain\fR,\fI...\fR\fP
 For each value in the comma separated list, Tor will track recent connections
 to hosts that match this value and attempt to

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2008-08-05 00:00:35 UTC (rev 16408)
+++ tor/trunk/src/or/circuitbuild.c	2008-08-05 00:12:05 UTC (rev 16409)
@@ -1508,52 +1508,6 @@
   }
 }
 
-/** Pick a random server digest that's running a Tor version that
- * doesn't have the reachability bug. These are versions 0.1.1.21-cvs+
- * 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.
- * XXX021 we can great simplify this function now that all the broken
- * versions are obsolete. -RD */
-static char *
-compute_preferred_testing_list(const char *answer)
-{
-  smartlist_t *choices;
-  routerlist_t *rl = router_get_routerlist();
-  routerinfo_t *router;
-  char *s;
-
-  if (answer) /* they have one in mind -- easy */
-    return tor_strdup(answer);
-
-  choices = smartlist_create();
-  /* now count up our choices */
-  SMARTLIST_FOREACH(rl->routers, routerinfo_t *, r,
-    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")) &&
-        !is_local_IP(r->addr) &&
-        !router_get_trusteddirserver_by_digest(r->cache_info.identity_digest))
-      smartlist_add(choices, r));
-  router = smartlist_choose(choices);
-  smartlist_free(choices);
-  if (!router) {
-    log_info(LD_CIRC, "Looking for middle server that doesn't have the "
-             "reachability bug, but didn't find one. Oh well.");
-    return NULL;
-  }
-  log_info(LD_CIRC, "Looking for middle server that doesn't have the "
-             "reachability bug, and chose '%s'. Great.", router->nickname);
-  s = tor_malloc(HEX_DIGEST_LEN+2);
-  s[0] = '$';
-  base16_encode(s+1, HEX_DIGEST_LEN+1,
-                router->cache_info.identity_digest, DIGEST_LEN);
-  return s;
-}
-
 /** A helper function used by onion_extend_cpath(). Use <b>purpose</b>
  * and <b>state</b> and the cpath <b>head</b> (currently populated only
  * to length <b>cur_len</b> to decide a suitable middle hop for a
@@ -1571,7 +1525,6 @@
   crypt_path_t *cpath;
   smartlist_t *excluded;
   or_options_t *options = get_options();
-  char *preferred = NULL;
   router_crn_flags_t flags = 0;
   tor_assert(_CIRCUIT_PURPOSE_MIN <= purpose &&
              purpose <= _CIRCUIT_PURPOSE_MAX);
@@ -1588,8 +1541,6 @@
       routerlist_add_family(excluded, r);
     }
   }
-  if (purpose == CIRCUIT_PURPOSE_TESTING)
-    preferred = compute_preferred_testing_list(options->TestVia);
 
   if (state->need_uptime)
     flags |= CRN_NEED_UPTIME;
@@ -1597,9 +1548,8 @@
     flags |= CRN_NEED_CAPACITY;
   if (options->_AllowInvalid & ALLOW_INVALID_MIDDLE)
     flags |= CRN_ALLOW_INVALID;
-  choice = router_choose_random_node(preferred,
+  choice = router_choose_random_node(NULL,
                                      excluded, options->ExcludeNodes, flags);
-  tor_free(preferred);
   smartlist_free(excluded);
   return choice;
 }

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2008-08-05 00:00:35 UTC (rev 16408)
+++ tor/trunk/src/or/config.c	2008-08-05 00:12:05 UTC (rev 16409)
@@ -301,7 +301,7 @@
   V(StrictExitNodes,             BOOL,     "0"),
   OBSOLETE("SysLog"),
   V(TestSocks,                   BOOL,     "0"),
-  V(TestVia,                     STRING,   NULL),
+  OBSOLETE("TestVia"),
   V(TrackHostExits,              CSV,      NULL),
   V(TrackHostExitsExpire,        INTERVAL, "30 minutes"),
   OBSOLETE("TrafficShaping"),
@@ -550,7 +550,6 @@
   /* ServerDNS: DetectHijacking, ResolvConfFile, SearchDomains */
   { "ShutdownWaitLength", "Wait this long for clients to finish when "
     "shutting down because of a SIGINT." },
-  /* { "TestVia", } */
 
   /* === directory cache options */
   { "DirPort", "Serve directory information from this port, and act as a "
@@ -3311,8 +3310,6 @@
     return -1;
   if (check_nickname_list(options->EntryNodes, "EntryNodes", msg))
     return -1;
-  if (check_nickname_list(options->TestVia, "TestVia", msg))
-    return -1;
   if (check_nickname_list(options->MyFamily, "MyFamily", msg))
     return -1;
   for (cl = options->NodeFamilies; cl; cl = cl->next) {

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-08-05 00:00:35 UTC (rev 16408)
+++ tor/trunk/src/or/or.h	2008-08-05 00:12:05 UTC (rev 16409)
@@ -2223,7 +2223,6 @@
   int NumCpus; /**< How many CPUs should we try to use? */
   int RunTesting; /**< If true, create testing circuits to measure how well the
                    * other ORs are running. */
-  char *TestVia; /**< When reachability testing, use these as middle hop. */
   config_line_t *RendConfigLines; /**< List of configuration lines
                                           * for rendezvous services. */
   char *ContactInfo; /**< Contact info to be published in the directory. */