mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Make sure the microdesc cache is loaded before setting a v3 md consensus
Otherwise, we can wind up munging our reference counts if we set it in the middle of loading the nodes. This happens because nodelist_set_consensus() and microdesc_reload_cache() are both in the business of adjusting microdescriptors' references.
This commit is contained in:
parent
4a10845075
commit
6201b8b361
@ -177,7 +177,10 @@ nodelist_set_consensus(networkstatus_t *ns)
|
||||
{
|
||||
const or_options_t *options = get_options();
|
||||
int authdir = authdir_mode_v2(options) || authdir_mode_v3(options);
|
||||
|
||||
init_nodelist();
|
||||
if (ns->flavor == FLAV_MICRODESC)
|
||||
(void) get_microdesc_cache(); /* Make sure it exists first. */
|
||||
|
||||
SMARTLIST_FOREACH(the_nodelist->nodes, node_t *, node,
|
||||
node->rs = NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user