]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix client side of 2203: Do not count BadExits as Exits.
authorMike Perry <mikeperry-git@fscked.org>
Tue, 25 Jan 2011 05:23:59 +0000 (21:23 -0800)
committerNick Mathewson <nickm@torproject.org>
Tue, 25 Jan 2011 22:49:02 +0000 (17:49 -0500)
src/or/routerlist.c

index 47caebf8df1fdbc0b43ebb7c527a3d38b8e56f6f..6d6386292feb7445aafcb742042a150eee77c7b1 100644 (file)
@@ -1722,7 +1722,7 @@ smartlist_choose_by_bandwidth_weights(smartlist_t *sl,
     double weight = 1;
     if (statuses) {
       routerstatus_t *status = smartlist_get(sl, i);
-      is_exit = status->is_exit;
+      is_exit = status->is_exit && !status->is_bad_exit;
       is_guard = status->is_possible_guard;
       is_dir = (status->dir_port != 0);
       if (!status->has_bandwidth) {
@@ -1742,7 +1742,7 @@ smartlist_choose_by_bandwidth_weights(smartlist_t *sl,
       routerinfo_t *router = smartlist_get(sl, i);
       rs = router_get_consensus_status_by_id(
              router->cache_info.identity_digest);
-      is_exit = router->is_exit;
+      is_exit = router->is_exit && !router->is_bad_exit;
       is_guard = router->is_possible_guard;
       is_dir = (router->dir_port != 0);
       if (rs && rs->has_bandwidth) {