[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.3.0' into maint-0.3.1

nickm at torproject.org nickm at torproject.org
Fri Dec 1 14:06:04 UTC 2017


commit ee48eb1eb5e643cd8af2a32df3cf8c48965f6ce4
Merge: 500f04a74 5fc0587c0
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 30 12:07:59 2017 -0500

    Merge branch 'maint-0.3.0' into maint-0.3.1

 changes/bug24313             |  5 +++++
 changes/trove-2017-009       | 10 ++++++++++
 changes/trove-2017-010       |  6 ++++++
 changes/trove-2017-011       |  8 ++++++++
 changes/trove-2017-012-part1 |  6 ++++++
 changes/trove-2017-012-part2 |  5 +++++
 src/common/crypto.c          | 16 +++++++++++++---
 src/or/entrynodes.c          |  3 ++-
 src/or/protover.c            |  5 +++++
 src/or/rendservice.c         |  8 +++++++-
 src/or/routerlist.c          |  5 ++++-
 11 files changed, 71 insertions(+), 6 deletions(-)

diff --cc src/or/routerlist.c
index 0e45f63f7,83e513448..507580f19
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@@ -2810,17 -2811,23 +2810,20 @@@ router_choose_random_node(smartlist_t *
    rule = weight_for_exit ? WEIGHT_FOR_EXIT :
      (need_guard ? WEIGHT_FOR_GUARD : WEIGHT_FOR_MID);
  
 -  /* Exclude relays that allow single hop exit circuits, if the user
 -   * wants to (such relays might be risky) */
 -  if (get_options()->ExcludeSingleHopRelays) {
 -    SMARTLIST_FOREACH(nodelist_get_list(), node_t *, node,
 -      if (node_allows_single_hop_exits(node)) {
 -        smartlist_add(excludednodes, node);
 -      });
 -  }
 +  /* Exclude relays that allow single hop exit circuits. This is an obsolete
 +   * option since 0.2.9.2-alpha and done by default in 0.3.1.0-alpha. */
 +  SMARTLIST_FOREACH(nodelist_get_list(), node_t *, node,
 +    if (node_allows_single_hop_exits(node)) {
 +      smartlist_add(excludednodes, node);
 +    });
  
-   if ((r = routerlist_find_my_routerinfo()))
+   /* If the node_t is not found we won't be to exclude ourself but we
+    * won't be able to pick ourself in router_choose_random_node() so
+    * this is fine to at least try with our routerinfo_t object. */
+   if ((r = router_get_my_routerinfo()))
      routerlist_add_node_and_family(excludednodes, r);
  
 -  router_add_running_nodes_to_smartlist(sl, allow_invalid,
 -                                        need_uptime, need_capacity,
 +  router_add_running_nodes_to_smartlist(sl, need_uptime, need_capacity,
                                          need_guard, need_desc, pref_addr,
                                          direct_conn);
    log_debug(LD_CIRC,





More information about the tor-commits mailing list