diff options
author | Roger Dingledine <arma@torproject.org> | 2005-08-24 02:31:02 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-08-24 02:31:02 +0000 |
commit | a120cc20c171164230d592337425e9016747f182 (patch) | |
tree | 5627a4e24b261920dc0cec80b61765748fc7d32f /src/or/router.c | |
parent | 5d590861c49f354d47d27b2e4edc971e0ecac914 (diff) | |
download | tor-a120cc20c171164230d592337425e9016747f182.tar.gz tor-a120cc20c171164230d592337425e9016747f182.zip |
Dirservers now do their own external reachability testing of each
Tor server, and only list them as running if they've been found to
be reachable.
Dirservers also log trouble servers, but only start complaining loudly
after they've been up for an hour, to reduce false positives. We still
need to do something about the fact that it is quite loud when there
are many trouble servers.
svn:r4829
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/or/router.c b/src/or/router.c index 9bb4716b4a..bbb43db67f 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -568,10 +568,13 @@ consider_publishable_server(time_t now, int force) /** OR only: if in clique mode, try to open connections to all of the * other ORs we know about. Otherwise, open connections to those we - * think are in clique mode. + * think are in clique mode.o + * + * If <b>force</b> is zero, only open the connection if we don't already + * have one. */ void -router_retry_connections(void) +router_retry_connections(int force) { int i; routerinfo_t *router; @@ -588,10 +591,12 @@ router_retry_connections(void) continue; if (!clique_mode(options) && !router_is_clique_mode(router)) continue; - if (!connection_get_by_identity_digest(router->identity_digest, + if (force || + !connection_get_by_identity_digest(router->identity_digest, CONN_TYPE_OR)) { - /* not in the list */ - log_fn(LOG_DEBUG,"connecting to OR at %s:%u.",router->address,router->or_port); + log_fn(LOG_INFO,"%sconnecting to %s at %s:%u.", + clique_mode(options) ? "(forced) " : "", + router->nickname, router->address, router->or_port); connection_or_connect(router->addr, router->or_port, router->identity_digest); } } |