diff options
author | Roger Dingledine <arma@torproject.org> | 2005-08-30 06:48:24 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-08-30 06:48:24 +0000 |
commit | 4240410a9d340d780c15e37af8213571172c8dcb (patch) | |
tree | 566dfc36c7647921466cf9284a717db7548ff991 | |
parent | e9524f9d2d19369e2ab7736ffe9f4744dd73cb4a (diff) | |
download | tor-4240410a9d340d780c15e37af8213571172c8dcb.tar.gz tor-4240410a9d340d780c15e37af8213571172c8dcb.zip |
don't whine about reachability if the guy is hibernating now.
speaking of which, we don't actually parse is_hibernating out
of the router descriptor right now. nick, can you fix this?
svn:r4886
-rw-r--r-- | src/or/dirserv.c | 2 | ||||
-rw-r--r-- | src/or/or.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 69b066ee31..7dc3db3d67 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 6b07ffedcf..45e5a7b240 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? */ |