aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/dirserv.c2
-rw-r--r--src/or/or.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 69b066ee3..7dc3db3d6 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -508,6 +508,8 @@ static int
dirserv_thinks_router_is_blatantly_unreachable(routerinfo_t *router, time_t now)
{
connection_t *conn;
+ if (router->is_hibernating)
+ return 0;
conn = connection_get_by_identity_digest(router->identity_digest,
CONN_TYPE_OR);
if (conn && conn->state == OR_CONN_STATE_OPEN &&
diff --git a/src/or/or.h b/src/or/or.h
index 6b07ffedc..45e5a7b24 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -736,6 +736,7 @@ typedef struct {
addr_policy_t *exit_policy; /**< What streams will this OR permit
* to exit? */
long uptime; /**< How many seconds the router claims to have been up */
+ uint8_t is_hibernating; /**< Whether the router claims to be hibernating */
smartlist_t *declared_family; /**< Nicknames of router which this router
* claims are its family. */
char *contact_info; /**< Declared contact info for this router. */
@@ -747,7 +748,7 @@ typedef struct {
* (For Authdir: Have we validated this OR?)
*/
- /* The below items are used only by authdirservers right now for
+ /* The below items are used only by authdirservers for
* reachability testing. */
time_t last_reachable; /**< When was the last time we could reach this OR? */
time_t testing_since; /**< When did we start testing reachability for this OR? */