[tor-bugs] #13066 [Tor]: smartlist_choose_node_by_bandwidth() does not consider bad exit

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Sep 6 10:27:55 UTC 2014


#13066: smartlist_choose_node_by_bandwidth() does not consider bad exit
-------------------------+-------------------------------------------------
     Reporter:  asn      |      Owner:
         Type:  defect   |     Status:  new
     Priority:  minor    |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  tor-client 025-backport
Actual Points:           |  026-triaged-1
       Points:           |  Parent ID:
-------------------------+-------------------------------------------------

Comment (by asn):

 Replying to [comment:1 nickm]:
 > Yes, this should get fixed.  It doesn't sound hard to do; are there any
 hidden obstacles to fixing this?

 I don't think there are any hidden obstacles. I '''think''' it might be
 enough to replace
 {{{
     is_exit = node->is_exit;
 }}}
 with
 {{{
     is_exit = node->is_exit && ! node->is_bad_exit;
 }}}
 like `smartlist_choose_node_by_bandwidth_weights()` does.

 FWIW, maybe a better long-term plan would be to replace those manual
 checks for `is_exit`/`is_bad_exit` with a `node_is_good_exit()` method,
 and only use that when checking whether a node is exit. It's unintuitive
 for new programmers to always check for those two flags instead of just
 `is_exit`.

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


More information about the tor-bugs mailing list