|
@@ -1828,7 +1828,7 @@ choose_good_exit_server_general(int need_uptime, int need_capacity)
|
|
|
* we'll retry later in this function with need_update and
|
|
|
* need_capacity set to 0. */
|
|
|
}
|
|
|
- if (!(node->is_valid || options->AllowInvalid_ & ALLOW_INVALID_EXIT)) {
|
|
|
+ if (!(node->is_valid)) {
|
|
|
/* if it's invalid and we don't want it */
|
|
|
n_supported[i] = -1;
|
|
|
// log_fn(LOG_DEBUG,"Skipping node %s (index %d) -- invalid router.",
|
|
@@ -1968,7 +1968,6 @@ pick_tor2web_rendezvous_node(router_crn_flags_t flags,
|
|
|
const or_options_t *options)
|
|
|
{
|
|
|
const node_t *rp_node = NULL;
|
|
|
- const int allow_invalid = (flags & CRN_ALLOW_INVALID) != 0;
|
|
|
const int need_desc = (flags & CRN_NEED_DESC) != 0;
|
|
|
const int pref_addr = (flags & CRN_PREF_ADDR) != 0;
|
|
|
const int direct_conn = (flags & CRN_DIRECT_CONN) != 0;
|
|
@@ -1980,7 +1979,6 @@ pick_tor2web_rendezvous_node(router_crn_flags_t flags,
|
|
|
|
|
|
/* Add all running nodes to all_live_nodes */
|
|
|
router_add_running_nodes_to_smartlist(all_live_nodes,
|
|
|
- allow_invalid,
|
|
|
0, 0, 0,
|
|
|
need_desc,
|
|
|
pref_addr,
|
|
@@ -2022,9 +2020,6 @@ pick_rendezvous_node(router_crn_flags_t flags)
|
|
|
{
|
|
|
const or_options_t *options = get_options();
|
|
|
|
|
|
- if (options->AllowInvalid_ & ALLOW_INVALID_RENDEZVOUS)
|
|
|
- flags |= CRN_ALLOW_INVALID;
|
|
|
-
|
|
|
#ifdef ENABLE_TOR2WEB_MODE
|
|
|
/* We want to connect directly to the node if we can */
|
|
|
router_crn_flags_t direct_flags = flags;
|
|
@@ -2081,8 +2076,6 @@ choose_good_exit_server(uint8_t purpose,
|
|
|
|
|
|
switch (purpose) {
|
|
|
case CIRCUIT_PURPOSE_C_GENERAL:
|
|
|
- if (options->AllowInvalid_ & ALLOW_INVALID_MIDDLE)
|
|
|
- flags |= CRN_ALLOW_INVALID;
|
|
|
if (is_internal) /* pick it like a middle hop */
|
|
|
return router_choose_random_node(NULL, options->ExcludeNodes, flags);
|
|
|
else
|
|
@@ -2280,10 +2273,6 @@ count_acceptable_nodes, (smartlist_t *nodes))
|
|
|
if (! node->is_running)
|
|
|
// log_debug(LD_CIRC,"Nope, the directory says %d is not running.",i);
|
|
|
continue;
|
|
|
- /* XXX This clause makes us count incorrectly: if AllowInvalidRouters
|
|
|
- * allows this node in some places, then we're getting an inaccurate
|
|
|
- * count. For now, be conservative and don't count it. But later we
|
|
|
- * should try to be smarter. */
|
|
|
if (! node->is_valid)
|
|
|
// log_debug(LD_CIRC,"Nope, the directory says %d is not valid.",i);
|
|
|
continue;
|
|
@@ -2354,8 +2343,6 @@ choose_good_middle_server(uint8_t purpose,
|
|
|
flags |= CRN_NEED_UPTIME;
|
|
|
if (state->need_capacity)
|
|
|
flags |= CRN_NEED_CAPACITY;
|
|
|
- if (options->AllowInvalid_ & ALLOW_INVALID_MIDDLE)
|
|
|
- flags |= CRN_ALLOW_INVALID;
|
|
|
choice = router_choose_random_node(excluded, options->ExcludeNodes, flags);
|
|
|
smartlist_free(excluded);
|
|
|
return choice;
|
|
@@ -2408,8 +2395,6 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state,
|
|
|
if (state->need_capacity)
|
|
|
flags |= CRN_NEED_CAPACITY;
|
|
|
}
|
|
|
- if (options->AllowInvalid_ & ALLOW_INVALID_ENTRY)
|
|
|
- flags |= CRN_ALLOW_INVALID;
|
|
|
|
|
|
choice = router_choose_random_node(excluded, options->ExcludeNodes, flags);
|
|
|
smartlist_free(excluded);
|