diff --git a/ChangeLog b/ChangeLog index 4ad8720609..44c6df7336 100644 --- a/ChangeLog +++ b/ChangeLog @@ -79,6 +79,9 @@ Changes in version 0.2.0.9-alpha - 2007-10-?? on our configured V3AuthVotingInterval: so unless the intervals matched up, we immediately rejected our own vote because it didn't start at the voting interval that caused us to construct a vote. + - Authorities no longer send back "400 you're unreachable please fix + it" errors to Tor servers that aren't online all the time. We're + supposed to tolerate these servers now. o Minor bugfixes (v3 directory protocol): - Delete unverified-consensus when the real consensus is set. diff --git a/src/or/dirserv.c b/src/or/dirserv.c index cf941f6c24..e9d552e8ac 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -883,22 +883,6 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) router->is_running = answer; } -/** Return 1 if we're confident that there's a problem with - * router's reachability and its operator should be notified. - */ -int -dirserv_thinks_router_is_blatantly_unreachable(routerinfo_t *router, - time_t now) -{ - if (router->is_hibernating) - return 0; - if (now >= router->last_reachable + 5*REACHABLE_TIMEOUT && - router->testing_since && - now >= router->testing_since + 5*REACHABLE_TIMEOUT) - return 1; - return 0; -} - /** Based on the routerinfo_ts in routers, allocate the * contents of a v1-style router-status line, and store it in * *router_status_out. Return 0 on success, -1 on failure. @@ -2452,7 +2436,6 @@ dirserv_orconn_tls_done(const char *address, ri->nickname); rep_hist_note_router_reachable(digest_rcvd, now); ri->last_reachable = now; - ri->num_unreachable_notifications = 0; } }); /* FFFF Maybe we should reinstate the code that dumps routers with the same diff --git a/src/or/or.h b/src/or/or.h index 5ce2039760..4e636af738 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1181,9 +1181,6 @@ typedef struct { time_t last_reachable; /** When did we start testing reachability for this OR? */ time_t testing_since; - /** How many times has a descriptor been posted and we believed - * this router to be unreachable? We only actually warn on the third. */ - int num_unreachable_notifications; /** What position is this descriptor within routerlist->routers? -1 for * none. */ @@ -2853,8 +2850,6 @@ int dirserv_add_descriptor(routerinfo_t *ri, const char **msg); int getinfo_helper_dirserv_unregistered(control_connection_t *conn, const char *question, char **answer); void dirserv_free_descriptors(void); -int dirserv_thinks_router_is_blatantly_unreachable(routerinfo_t *router, - time_t now); int list_server_status(smartlist_t *routers, char **router_status_out, int for_controller); int dirserv_dump_directory_to_string(char **dir_out, diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 95e63df3a9..c25a25adbb 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2536,11 +2536,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, int authdir = authdir_mode(get_options()); int authdir_believes_valid = 0; routerinfo_t *old_router; - /* router_have_minimum_dir_info() has side effects, so do it before we - * start the real work */ - int authdir_may_warn_about_unreachable_server = - authdir && !from_cache && !from_fetch && - router_have_minimum_dir_info(); networkstatus_vote_t *consensus = networkstatus_get_latest_consensus(); const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); int in_consensus = 0; @@ -2648,33 +2643,14 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, return -1; } else { /* Same key, new. */ - int unreachable = 0; log_debug(LD_DIR, "Replacing entry for router '%s/%s' [%s]", router->nickname, old_router->nickname, hex_str(id_digest,DIGEST_LEN)); if (router->addr == old_router->addr && router->or_port == old_router->or_port) { - /* these carry over when the address and orport are unchanged.*/ + /* these carry over when the address and orport are unchanged. */ router->last_reachable = old_router->last_reachable; router->testing_since = old_router->testing_since; - router->num_unreachable_notifications = - old_router->num_unreachable_notifications; - } - if (authdir_may_warn_about_unreachable_server && - 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. " - "(ContactInfo '%s', platform '%s').", - router->nickname, - router->contact_info ? router->contact_info : "", - router->platform ? router->platform : ""); - } else { - log_info(LD_DIR,"'%s' may be unreachable -- the %d previous " - "descriptors were thought to be unreachable.", - router->nickname, router->num_unreachable_notifications); - router->num_unreachable_notifications++; - } } routerlist_replace(routerlist, old_router, router); if (!from_cache) { @@ -2682,11 +2658,10 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, &routerlist->desc_store); } directory_set_dirty(); - *msg = unreachable ? "Dirserver believes your ORPort is unreachable" : - authdir_believes_valid ? "Valid server updated" : + *msg = authdir_believes_valid ? "Valid server updated" : ("Invalid server updated. (This dirserver is marking your " "server as unapproved.)"); - return unreachable ? 1 : 0; + return 0; } }