diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/or/routerlist.c | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -31,6 +31,10 @@ Changes in version 0.2.0.3-alpha - 2007-??-?? - STREAM NEW events are generated for DNSPort requests and for tunneled directory connections. (Patch from Robert Hogan.) + o Major bugfixes (directory): + - Fix a crash bug in directory authorities when we re-number the + routerlist while inserting a new router. [Bugfix on 0.1.2.x] + o Minor bugfixes (directory): - Fix another crash bug related to extra-info caching. (Bug found by Peter Palfrader.) [Bugfix on 0.2.0.2-alpha] diff --git a/src/or/routerlist.c b/src/or/routerlist.c index f9efc3f301..f8216e7218 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2423,6 +2423,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, old_router = rimap_get(routerlist->identity_map, router->cache_info.identity_digest); if (old_router) { + int have_min_info = router_have_minimum_dir_info(); /* can mess with pos, + * so call it now.*/ int pos = old_router->routerlist_index; tor_assert(0 <= pos && pos < smartlist_len(routerlist->routers)); tor_assert(smartlist_get(routerlist->routers, pos) == old_router); @@ -2452,10 +2454,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, router->num_unreachable_notifications = old_router->num_unreachable_notifications; } - if (authdir && !from_cache && !from_fetch && - router_have_minimum_dir_info() && - dirserv_thinks_router_is_blatantly_unreachable(router, - time(NULL))) { + if (authdir && !from_cache && !from_fetch && have_min_info && + dirserv_thinks_router_is_blatantly_unreachable(router, time(NULL))) { if (router->num_unreachable_notifications >= 3) { unreachable = 1; log_notice(LD_DIR, "Notifying server '%s' that it's unreachable. " |