mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Merge branch 'bug8367_v2'
This commit is contained in:
commit
dc4ccfdbe2
@ -133,6 +133,8 @@ entry_guard_set_status(entry_guard_t *e, const node_t *node,
|
|||||||
if (node) {
|
if (node) {
|
||||||
int is_dir = node_is_dir(node) && node->rs &&
|
int is_dir = node_is_dir(node) && node->rs &&
|
||||||
node->rs->version_supports_microdesc_cache;
|
node->rs->version_supports_microdesc_cache;
|
||||||
|
if (options->UseBridges && node_is_a_configured_bridge(node))
|
||||||
|
is_dir = 1;
|
||||||
if (e->is_dir_cache != is_dir) {
|
if (e->is_dir_cache != is_dir) {
|
||||||
e->is_dir_cache = is_dir;
|
e->is_dir_cache = is_dir;
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@ -354,6 +356,8 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
|
|||||||
}
|
}
|
||||||
entry->is_dir_cache = node->rs &&
|
entry->is_dir_cache = node->rs &&
|
||||||
node->rs->version_supports_microdesc_cache;
|
node->rs->version_supports_microdesc_cache;
|
||||||
|
if (get_options()->UseBridges && node_is_a_configured_bridge(node))
|
||||||
|
entry->is_dir_cache = 1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else if (!for_directory) {
|
} else if (!for_directory) {
|
||||||
@ -377,6 +381,8 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
|
|||||||
memcpy(entry->identity, node->identity, DIGEST_LEN);
|
memcpy(entry->identity, node->identity, DIGEST_LEN);
|
||||||
entry->is_dir_cache = node_is_dir(node) &&
|
entry->is_dir_cache = node_is_dir(node) &&
|
||||||
node->rs && node->rs->version_supports_microdesc_cache;
|
node->rs && node->rs->version_supports_microdesc_cache;
|
||||||
|
if (get_options()->UseBridges && node_is_a_configured_bridge(node))
|
||||||
|
entry->is_dir_cache = 1;
|
||||||
|
|
||||||
/* Choose expiry time smudged over the past month. The goal here
|
/* Choose expiry time smudged over the past month. The goal here
|
||||||
* is to a) spread out when Tor clients rotate their guards, so they
|
* is to a) spread out when Tor clients rotate their guards, so they
|
||||||
|
Loading…
Reference in New Issue
Block a user