]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.3.0' into maint-0.3.1
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/protover.c
src/or/rendservice.c
src/or/routerlist.c

Simple merge
Simple merge
Simple merge
Simple merge
index 0e45f63f702c20efb828ec8943f689565b351267,83e513448d543b766a5a1bef1ef303a880d3fe42..507580f19ef53818a1cbc8b9b7f6a6b683951bc5
@@@ -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,