[tor-bugs] #9926 [Tor]: Stop being willing to build 2-hop circuits when there aren't 3 relays

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 8 14:37:50 UTC 2013


#9926: Stop being willing to build 2-hop circuits when there aren't 3 relays
--------------------+------------------------------------
 Reporter:  arma    |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:  Tor: 0.2.5.x-final
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 new_route_len() ends with
 {{{
   if (num_acceptable_routers < 2) {
     log_info(LD_CIRC,
              "Not enough acceptable routers (%d). Discarding this
 circuit.",
              num_acceptable_routers);
     return -1;
   }

   if (num_acceptable_routers < routelen) {
     log_info(LD_CIRC,"Not enough routers: cutting routelen from %d to
 %d.",
              routelen, num_acceptable_routers);
     routelen = num_acceptable_routers;
   }
 }}}

 We should replace this with the simpler
 {{{
   if (num_acceptable_routers < 3) {
     log_info(LD_CIRC,
              "Not enough acceptable routers (%d). Discarding this
 circuit.",
              num_acceptable_routers);
     return -1;
   }
 }}}

 to simplify things.

 Note that the "oh hey let's just use two hops" case doesn't trigger in a
 real Tor network, because we won't be willing to make circuits if we don't
 have at least x% of the descriptors, so this code only comes into play
 when the consensus says there are 5 or something relays total.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9926>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list