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

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


commit fd73a168ca5bf8ea6a0fa01878dd16d356d14cfa
Merge: 25d50decb ee48eb1eb
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 30 12:07:59 2017 -0500

    Merge branch 'maint-0.3.1' into maint-0.3.2

 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 355f8e0fa,507580f19..af4f67dc1
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@@ -2825,21 -2810,17 +2825,24 @@@ 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. 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,
 +  SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), node_t *, node) {
      if (node_allows_single_hop_exits(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_add(excludednodes, node);
 -    });
 +    } else if (rendezvous_v3 &&
 +               !node_supports_v3_rendezvous_point(node)) {
 +      /* Exclude relays that do not support to rendezvous for a hidden service
 +       * version 3. */
 +      smartlist_add(excludednodes, node);
 +    }
 +  } SMARTLIST_FOREACH_END(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, need_uptime, need_capacity,





More information about the tor-commits mailing list