aboutsummaryrefslogtreecommitdiff
path: root/src/core/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-14 10:59:30 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-14 10:59:30 -0400
commit2b33e8037e7ae5e947ce3186a06c90478de6c7e2 (patch)
tree45e365d81b5be942fb4364755ad1b6247a2e9d46 /src/core/or
parent1d554e4bafcff076c0ebba34b8292dea44c6dd06 (diff)
parent268d01ada5f4a11c5d8e63215288eb593dbfb9ed (diff)
downloadtor-2b33e8037e7ae5e947ce3186a06c90478de6c7e2.tar.gz
tor-2b33e8037e7ae5e947ce3186a06c90478de6c7e2.zip
Merge branch 'ticket40033_045_01_squashed'
Diffstat (limited to 'src/core/or')
-rw-r--r--src/core/or/circuitbuild.c22
-rw-r--r--src/core/or/connection_or.c2
2 files changed, 12 insertions, 12 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index 24543d3ac0..fd56ca1c65 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -1777,7 +1777,7 @@ pick_restricted_middle_node(router_crn_flags_t flags,
{
const node_t *middle_node = NULL;
- smartlist_t *whitelisted_live_middles = smartlist_new();
+ smartlist_t *allowlisted_live_middles = smartlist_new();
smartlist_t *all_live_nodes = smartlist_new();
tor_assert(pick_from);
@@ -1785,21 +1785,21 @@ pick_restricted_middle_node(router_crn_flags_t flags,
/* Add all running nodes to all_live_nodes */
router_add_running_nodes_to_smartlist(all_live_nodes, flags);
- /* Filter all_live_nodes to only add live *and* whitelisted middles
- * to the list whitelisted_live_middles. */
+ /* Filter all_live_nodes to only add live *and* allowlisted middles
+ * to the list allowlisted_live_middles. */
SMARTLIST_FOREACH_BEGIN(all_live_nodes, node_t *, live_node) {
if (routerset_contains_node(pick_from, live_node)) {
- smartlist_add(whitelisted_live_middles, live_node);
+ smartlist_add(allowlisted_live_middles, live_node);
}
} SMARTLIST_FOREACH_END(live_node);
/* Honor ExcludeNodes */
if (exclude_set) {
- routerset_subtract_nodes(whitelisted_live_middles, exclude_set);
+ routerset_subtract_nodes(allowlisted_live_middles, exclude_set);
}
if (exclude_list) {
- smartlist_subtract(whitelisted_live_middles, exclude_list);
+ smartlist_subtract(allowlisted_live_middles, exclude_list);
}
/**
@@ -1815,9 +1815,9 @@ pick_restricted_middle_node(router_crn_flags_t flags,
* If there are a lot of nodes in here, assume they did not load balance
* and do it for them, but also warn them that they may be Doing It Wrong.
*/
- if (smartlist_len(whitelisted_live_middles) <=
+ if (smartlist_len(allowlisted_live_middles) <=
MAX_SANE_RESTRICTED_NODES) {
- middle_node = smartlist_choose(whitelisted_live_middles);
+ middle_node = smartlist_choose(allowlisted_live_middles);
} else {
static ratelim_t pinned_notice_limit = RATELIM_INIT(24*3600);
log_fn_ratelim(&pinned_notice_limit, LOG_NOTICE, LD_CIRC,
@@ -1825,17 +1825,17 @@ pick_restricted_middle_node(router_crn_flags_t flags,
"in %d total nodes. This is a lot of nodes. "
"You may want to consider using a Tor controller "
"to select and update a smaller set of nodes instead.",
- position_hint, smartlist_len(whitelisted_live_middles));
+ position_hint, smartlist_len(allowlisted_live_middles));
/* NO_WEIGHTING here just means don't take node flags into account
* (ie: use consensus measurement only). This is done so that
* we don't further surprise the user by not using Exits that they
* specified at all */
- middle_node = node_sl_choose_by_bandwidth(whitelisted_live_middles,
+ middle_node = node_sl_choose_by_bandwidth(allowlisted_live_middles,
NO_WEIGHTING);
}
- smartlist_free(whitelisted_live_middles);
+ smartlist_free(allowlisted_live_middles);
smartlist_free(all_live_nodes);
return middle_node;
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c
index 1e49155fa5..079fa3dfcb 100644
--- a/src/core/or/connection_or.c
+++ b/src/core/or/connection_or.c
@@ -1160,7 +1160,7 @@ static time_t or_connect_failure_map_next_cleanup_ts = 0;
* port.
*
* We need to identify a connection failure with these three values because we
- * want to avoid to wrongfully blacklist a relay if someone is trying to
+ * want to avoid to wrongfully block a relay if someone is trying to
* extend to a known identity digest but with the wrong IP/port. For instance,
* it can happen if a relay changed its port but the client still has an old
* descriptor with the old port. We want to stop connecting to that