]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.3.1' into maint-0.3.2
authorNick Mathewson <nickm@torproject.org>
Thu, 30 Nov 2017 17:07:59 +0000 (12:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 30 Nov 2017 17:07:59 +0000 (12:07 -0500)
1  2 
src/common/crypto.c
src/or/entrynodes.c
src/or/rendservice.c
src/or/routerlist.c

Simple merge
Simple merge
Simple merge
index 355f8e0fa04ca60bf5ebd9224b88cc09b5c38d0b,507580f19ef53818a1cbc8b9b7f6a6b683951bc5..af4f67dc121764397040a8b74736ea628c5ee928
@@@ -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,