mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
r15849@catbus: nickm | 2007-10-16 10:24:38 -0400
Correct and additional fix to bug 529. svn:r11985
This commit is contained in:
parent
03ce9d3ee7
commit
c5fb1c19eb
@ -1172,16 +1172,28 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
|
||||
rs = smartlist_get(ns->routerstatus_list, idx);
|
||||
}
|
||||
if (r>0) {
|
||||
/* We have no routerstatus for this router. Skip it. */
|
||||
router->is_named = 0;
|
||||
/* We have no routerstatus for this router. Clear flags and skip it. */
|
||||
if (!authdir) {
|
||||
router->is_named = 0;
|
||||
if (router->purpose == ROUTER_PURPOSE_GENERAL) {
|
||||
router->is_valid = router->is_running =
|
||||
router->is_fast = router->is_stable =
|
||||
router->is_possible_guard = router->is_exit =
|
||||
router->is_bad_exit = 0;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
tor_assert(r==0);
|
||||
|
||||
ds = router_get_trusteddirserver_by_digest(digest);
|
||||
|
||||
if (!namingdir)
|
||||
router->is_named = rs->is_named;
|
||||
if (!namingdir) {
|
||||
if (rs->is_named && !strcasecmp(router->nickname, rs->nickname))
|
||||
router->is_named = 1;
|
||||
else
|
||||
router->is_named = 0;
|
||||
}
|
||||
|
||||
if (!authdir) {
|
||||
/* If we're not an authdir, believe others. */
|
||||
@ -1192,10 +1204,6 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
|
||||
router->is_possible_guard = rs->is_possible_guard;
|
||||
router->is_exit = rs->is_exit;
|
||||
router->is_bad_exit = rs->is_bad_exit;
|
||||
if (rs->is_named && !strcasecmp(router->nickname, rs->nickname))
|
||||
router->is_named = 1;
|
||||
else
|
||||
router->is_named = 0;
|
||||
}
|
||||
if (router->is_running && ds) {
|
||||
download_status_reset(&ds->v2_ns_dl_status);
|
||||
|
Loading…
Reference in New Issue
Block a user