Loading ChangeLog +3 −0 Original line number Original line Diff line number Diff line Loading @@ -79,6 +79,9 @@ Changes in version 0.2.0.9-alpha - 2007-10-?? on our configured V3AuthVotingInterval: so unless the intervals on our configured V3AuthVotingInterval: so unless the intervals matched up, we immediately rejected our own vote because it didn't matched up, we immediately rejected our own vote because it didn't start at the voting interval that caused us to construct a vote. 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): o Minor bugfixes (v3 directory protocol): - Delete unverified-consensus when the real consensus is set. - Delete unverified-consensus when the real consensus is set. Loading src/or/dirserv.c +0 −17 Original line number Original line Diff line number Diff line Loading @@ -883,22 +883,6 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) router->is_running = answer; router->is_running = answer; } } /** Return 1 if we're confident that there's a problem with * <b>router</b>'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 <b>routers</b>, allocate the /** Based on the routerinfo_ts in <b>routers</b>, allocate the * contents of a v1-style router-status line, and store it in * contents of a v1-style router-status line, and store it in * *<b>router_status_out</b>. Return 0 on success, -1 on failure. * *<b>router_status_out</b>. Return 0 on success, -1 on failure. Loading Loading @@ -2452,7 +2436,6 @@ dirserv_orconn_tls_done(const char *address, ri->nickname); ri->nickname); rep_hist_note_router_reachable(digest_rcvd, now); rep_hist_note_router_reachable(digest_rcvd, now); ri->last_reachable = now; ri->last_reachable = now; ri->num_unreachable_notifications = 0; } } }); }); /* FFFF Maybe we should reinstate the code that dumps routers with the same /* FFFF Maybe we should reinstate the code that dumps routers with the same Loading src/or/or.h +0 −5 Original line number Original line Diff line number Diff line Loading @@ -1181,9 +1181,6 @@ typedef struct { time_t last_reachable; time_t last_reachable; /** When did we start testing reachability for this OR? */ /** When did we start testing reachability for this OR? */ time_t testing_since; 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 /** What position is this descriptor within routerlist->routers? -1 for * none. */ * none. */ Loading Loading @@ -2853,8 +2850,6 @@ int dirserv_add_descriptor(routerinfo_t *ri, const char **msg); int getinfo_helper_dirserv_unregistered(control_connection_t *conn, int getinfo_helper_dirserv_unregistered(control_connection_t *conn, const char *question, char **answer); const char *question, char **answer); void dirserv_free_descriptors(void); 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 list_server_status(smartlist_t *routers, char **router_status_out, int for_controller); int for_controller); int dirserv_dump_directory_to_string(char **dir_out, int dirserv_dump_directory_to_string(char **dir_out, Loading src/or/routerlist.c +3 −28 Original line number Original line Diff line number Diff line Loading @@ -2536,11 +2536,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, int authdir = authdir_mode(get_options()); int authdir = authdir_mode(get_options()); int authdir_believes_valid = 0; int authdir_believes_valid = 0; routerinfo_t *old_router; 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(); networkstatus_vote_t *consensus = networkstatus_get_latest_consensus(); const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); int in_consensus = 0; int in_consensus = 0; Loading Loading @@ -2648,7 +2643,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, return -1; return -1; } else { } else { /* Same key, new. */ /* Same key, new. */ int unreachable = 0; log_debug(LD_DIR, "Replacing entry for router '%s/%s' [%s]", log_debug(LD_DIR, "Replacing entry for router '%s/%s' [%s]", router->nickname, old_router->nickname, router->nickname, old_router->nickname, hex_str(id_digest,DIGEST_LEN)); hex_str(id_digest,DIGEST_LEN)); Loading @@ -2657,24 +2651,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, /* 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->last_reachable = old_router->last_reachable; router->testing_since = old_router->testing_since; 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); routerlist_replace(routerlist, old_router, router); if (!from_cache) { if (!from_cache) { Loading @@ -2682,11 +2658,10 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, &routerlist->desc_store); &routerlist->desc_store); } } directory_set_dirty(); directory_set_dirty(); *msg = unreachable ? "Dirserver believes your ORPort is unreachable" : *msg = authdir_believes_valid ? "Valid server updated" : authdir_believes_valid ? "Valid server updated" : ("Invalid server updated. (This dirserver is marking your " ("Invalid server updated. (This dirserver is marking your " "server as unapproved.)"); "server as unapproved.)"); return unreachable ? 1 : 0; return 0; } } } } Loading Loading
ChangeLog +3 −0 Original line number Original line Diff line number Diff line Loading @@ -79,6 +79,9 @@ Changes in version 0.2.0.9-alpha - 2007-10-?? on our configured V3AuthVotingInterval: so unless the intervals on our configured V3AuthVotingInterval: so unless the intervals matched up, we immediately rejected our own vote because it didn't matched up, we immediately rejected our own vote because it didn't start at the voting interval that caused us to construct a vote. 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): o Minor bugfixes (v3 directory protocol): - Delete unverified-consensus when the real consensus is set. - Delete unverified-consensus when the real consensus is set. Loading
src/or/dirserv.c +0 −17 Original line number Original line Diff line number Diff line Loading @@ -883,22 +883,6 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) router->is_running = answer; router->is_running = answer; } } /** Return 1 if we're confident that there's a problem with * <b>router</b>'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 <b>routers</b>, allocate the /** Based on the routerinfo_ts in <b>routers</b>, allocate the * contents of a v1-style router-status line, and store it in * contents of a v1-style router-status line, and store it in * *<b>router_status_out</b>. Return 0 on success, -1 on failure. * *<b>router_status_out</b>. Return 0 on success, -1 on failure. Loading Loading @@ -2452,7 +2436,6 @@ dirserv_orconn_tls_done(const char *address, ri->nickname); ri->nickname); rep_hist_note_router_reachable(digest_rcvd, now); rep_hist_note_router_reachable(digest_rcvd, now); ri->last_reachable = now; ri->last_reachable = now; ri->num_unreachable_notifications = 0; } } }); }); /* FFFF Maybe we should reinstate the code that dumps routers with the same /* FFFF Maybe we should reinstate the code that dumps routers with the same Loading
src/or/or.h +0 −5 Original line number Original line Diff line number Diff line Loading @@ -1181,9 +1181,6 @@ typedef struct { time_t last_reachable; time_t last_reachable; /** When did we start testing reachability for this OR? */ /** When did we start testing reachability for this OR? */ time_t testing_since; 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 /** What position is this descriptor within routerlist->routers? -1 for * none. */ * none. */ Loading Loading @@ -2853,8 +2850,6 @@ int dirserv_add_descriptor(routerinfo_t *ri, const char **msg); int getinfo_helper_dirserv_unregistered(control_connection_t *conn, int getinfo_helper_dirserv_unregistered(control_connection_t *conn, const char *question, char **answer); const char *question, char **answer); void dirserv_free_descriptors(void); 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 list_server_status(smartlist_t *routers, char **router_status_out, int for_controller); int for_controller); int dirserv_dump_directory_to_string(char **dir_out, int dirserv_dump_directory_to_string(char **dir_out, Loading
src/or/routerlist.c +3 −28 Original line number Original line Diff line number Diff line Loading @@ -2536,11 +2536,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, int authdir = authdir_mode(get_options()); int authdir = authdir_mode(get_options()); int authdir_believes_valid = 0; int authdir_believes_valid = 0; routerinfo_t *old_router; 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(); networkstatus_vote_t *consensus = networkstatus_get_latest_consensus(); const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); int in_consensus = 0; int in_consensus = 0; Loading Loading @@ -2648,7 +2643,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, return -1; return -1; } else { } else { /* Same key, new. */ /* Same key, new. */ int unreachable = 0; log_debug(LD_DIR, "Replacing entry for router '%s/%s' [%s]", log_debug(LD_DIR, "Replacing entry for router '%s/%s' [%s]", router->nickname, old_router->nickname, router->nickname, old_router->nickname, hex_str(id_digest,DIGEST_LEN)); hex_str(id_digest,DIGEST_LEN)); Loading @@ -2657,24 +2651,6 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, /* 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->last_reachable = old_router->last_reachable; router->testing_since = old_router->testing_since; 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); routerlist_replace(routerlist, old_router, router); if (!from_cache) { if (!from_cache) { Loading @@ -2682,11 +2658,10 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, &routerlist->desc_store); &routerlist->desc_store); } } directory_set_dirty(); directory_set_dirty(); *msg = unreachable ? "Dirserver believes your ORPort is unreachable" : *msg = authdir_believes_valid ? "Valid server updated" : authdir_believes_valid ? "Valid server updated" : ("Invalid server updated. (This dirserver is marking your " ("Invalid server updated. (This dirserver is marking your " "server as unapproved.)"); "server as unapproved.)"); return unreachable ? 1 : 0; return 0; } } } } Loading