diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-16 14:25:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-16 14:25:16 +0000 |
commit | c5fb1c19eb9f1a4de223bf96e69f9351d38c6e00 (patch) | |
tree | 5828534736212417ef2dc1bd5ec26ae45bf4bda6 /src | |
parent | 03ce9d3ee721ca60f052abe1602b7c134e42d303 (diff) | |
download | tor-c5fb1c19eb9f1a4de223bf96e69f9351d38c6e00.tar.gz tor-c5fb1c19eb9f1a4de223bf96e69f9351d38c6e00.zip |
r15849@catbus: nickm | 2007-10-16 10:24:38 -0400
Correct and additional fix to bug 529.
svn:r11985
Diffstat (limited to 'src')
-rw-r--r-- | src/or/networkstatus.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 89e9231d7c..ae55ee5b47 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -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); |