mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 05:26:20 +02:00
Remove client-side bad directory logic
Implements the second half of #13060.
This commit is contained in:
parent
8099dee992
commit
409a56281e
@ -1,4 +1,6 @@
|
||||
o Removed features:
|
||||
- Directory authorities do not support giving out the BadDirectory
|
||||
flag anymore.
|
||||
- Clients don't understand the BadDirectory flag in the consensus
|
||||
anymore, and ignore it.
|
||||
|
||||
|
@ -2181,8 +2181,7 @@ clear_status_flags_on_sybil(routerstatus_t *rs)
|
||||
{
|
||||
rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast =
|
||||
rs->is_flagged_running = rs->is_named = rs->is_valid =
|
||||
rs->is_hs_dir = rs->is_possible_guard = rs->is_bad_exit =
|
||||
rs->is_bad_directory = 0;
|
||||
rs->is_hs_dir = rs->is_possible_guard = rs->is_bad_exit = 0;
|
||||
/* FFFF we might want some mechanism to check later on if we
|
||||
* missed zeroing any flags: it's easy to add a new flag but
|
||||
* forget to add it to this clause. */
|
||||
|
@ -1055,7 +1055,6 @@ routerstatus_has_changed(const routerstatus_t *a, const routerstatus_t *b)
|
||||
a->is_valid != b->is_valid ||
|
||||
a->is_possible_guard != b->is_possible_guard ||
|
||||
a->is_bad_exit != b->is_bad_exit ||
|
||||
a->is_bad_directory != b->is_bad_directory ||
|
||||
a->is_hs_dir != b->is_hs_dir ||
|
||||
a->version_known != b->version_known;
|
||||
}
|
||||
|
@ -241,7 +241,6 @@ nodelist_set_consensus(networkstatus_t *ns)
|
||||
node->is_stable = rs->is_stable;
|
||||
node->is_possible_guard = rs->is_possible_guard;
|
||||
node->is_exit = rs->is_exit;
|
||||
node->is_bad_directory = rs->is_bad_directory;
|
||||
node->is_bad_exit = rs->is_bad_exit;
|
||||
node->is_hs_dir = rs->is_hs_dir;
|
||||
node->ipv6_preferred = 0;
|
||||
@ -267,8 +266,7 @@ nodelist_set_consensus(networkstatus_t *ns)
|
||||
node->is_valid = node->is_running = node->is_hs_dir =
|
||||
node->is_fast = node->is_stable =
|
||||
node->is_possible_guard = node->is_exit =
|
||||
node->is_bad_exit = node->is_bad_directory =
|
||||
node->ipv6_preferred = 0;
|
||||
node->is_bad_exit = node->ipv6_preferred = 0;
|
||||
}
|
||||
}
|
||||
} SMARTLIST_FOREACH_END(node);
|
||||
|
@ -2139,8 +2139,6 @@ typedef struct routerstatus_t {
|
||||
* choice as an entry guard. */
|
||||
unsigned int is_bad_exit:1; /**< True iff this node is a bad choice for
|
||||
* an exit node. */
|
||||
unsigned int is_bad_directory:1; /**< Do we think this directory is junky,
|
||||
* underpowered, or otherwise useless? */
|
||||
unsigned int is_hs_dir:1; /**< True iff this router is a v2-or-later hidden
|
||||
* service directory. */
|
||||
/** True iff we know version info for this router. (i.e., a "v" entry was
|
||||
@ -2300,8 +2298,6 @@ typedef struct node_t {
|
||||
unsigned int is_exit:1; /**< Do we think this is an OK exit? */
|
||||
unsigned int is_bad_exit:1; /**< Do we think this exit is censored, borked,
|
||||
* or otherwise nasty? */
|
||||
unsigned int is_bad_directory:1; /**< Do we think this directory is junky,
|
||||
* underpowered, or otherwise useless? */
|
||||
unsigned int is_hs_dir:1; /**< True iff this router is a hidden service
|
||||
* directory according to the authorities. */
|
||||
|
||||
|
@ -1450,8 +1450,6 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags)
|
||||
|
||||
if (!node->is_running || !status->dir_port || !node->is_valid)
|
||||
continue;
|
||||
if (node->is_bad_directory)
|
||||
continue;
|
||||
if (requireother && router_digest_is_me(node->identity))
|
||||
continue;
|
||||
is_trusted = router_digest_is_trusted_dir(node->identity);
|
||||
|
@ -1900,8 +1900,6 @@ routerstatus_parse_entry_from_string(memarea_t *area,
|
||||
rs->is_possible_guard = 1;
|
||||
else if (!strcmp(tok->args[i], "BadExit"))
|
||||
rs->is_bad_exit = 1;
|
||||
else if (!strcmp(tok->args[i], "BadDirectory"))
|
||||
rs->is_bad_directory = 1;
|
||||
else if (!strcmp(tok->args[i], "Authority"))
|
||||
rs->is_authority = 1;
|
||||
else if (!strcmp(tok->args[i], "Unnamed") &&
|
||||
|
Loading…
Reference in New Issue
Block a user