summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-03-13 01:59:09 +0000
committerRoger Dingledine <arma@torproject.org>2007-03-13 01:59:09 +0000
commitbf3b3a44f38b53b948e8ae148359edd690ee4c24 (patch)
tree13e8ab4fc7a60637c82dbfef5b1de820b3d68221
parenta70be61dd51506755184374cd6b3c78c45296d8f (diff)
downloadtor-bf3b3a44f38b53b948e8ae148359edd690ee4c24.tar.gz
tor-bf3b3a44f38b53b948e8ae148359edd690ee4c24.zip
Stop allowing hibernating servers to be "stable" or "fast".
This is what I meant to do in r9690 but didn't actually do. svn:r9808
-rw-r--r--ChangeLog3
-rw-r--r--doc/spec/dir-spec.txt24
-rw-r--r--src/or/dirserv.c2
3 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 50f5a5a4f5..554f1a8bb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,9 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
try to use \ consistently on windows and / consistently on unix: it
makes the log messages nicer.
+ o Minor bugfixes:
+ - Stop allowing hibernating servers to be "stable" or "fast".
+
Changes in version 0.1.2.10-rc - 2007-03-07
o Major bugfixes (Windows):
diff --git a/doc/spec/dir-spec.txt b/doc/spec/dir-spec.txt
index 727349acb1..bd3d57a34d 100644
--- a/doc/spec/dir-spec.txt
+++ b/doc/spec/dir-spec.txt
@@ -425,6 +425,9 @@ $Id$
authorities MAY do things differently, so long as clients keep working
well. Clients MUST NOT depend on the exact behaviors in this section.)
+ In the below definitions, a router is considered "active" if it is
+ running, valid, and not hibernating.
+
"Valid" -- a router is 'Valid' if it is running a version of Tor not
known to be broken, and the directory authority has not blacklisted
it as suspicious.
@@ -441,20 +444,19 @@ $Id$
"Running" -- A router is 'Running' if the authority managed to connect to
it successfully within the last 30 minutes.
- "Stable" -- A router is 'Stable' if it is running, valid, not
- hibernating, and either its uptime is at least the median uptime for
- known running, valid, non-hibernating routers, or its uptime is at
- least 30 days. Routers are never called stable if they are running
- a version of Tor known to drop circuits stupidly. (0.1.1.10-alpha
- through 0.1.1.16-rc are stupid this way.)
+ "Stable" -- A router is 'Stable' if it is active, and either its
+ uptime is at least the median uptime for known active routers, or
+ its uptime is at least 30 days. Routers are never called stable if
+ they are running a version of Tor known to drop circuits stupidly.
+ (0.1.1.10-alpha through 0.1.1.16-rc are stupid this way.)
- "Fast" -- A router is 'Fast' if its bandwidth is in the top 7/8ths for
- known running, valid routers.
+ "Fast" -- A router is 'Fast' if it is active, and its bandwidth is
+ in the top 7/8ths for known active routers.
"Guard" -- A router is a possible 'Guard' if it is 'Stable' and its
- bandwidth is above median for known running, valid routers. If the total
- bandwidth of Running Valid non-BadExit Exit servers is less than one third
- of the total bandwidth of all Running Valid servers, no Exit is listed as
+ bandwidth is above median for known active routers. If the total
+ bandwidth of active non-BadExit Exit servers is less than one third
+ of the total bandwidth of all active servers, no Exit is listed as
a Guard.
"Authority" -- A router is called an 'Authority' if the authority
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index cc85d090f6..3e7dad01c4 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1629,9 +1629,11 @@ generate_v2_networkstatus(void)
tor_version_as_new_as(ri->platform,"0.1.1.10-alpha") &&
!tor_version_as_new_as(ri->platform,"0.1.1.16-rc-cvs");
int f_stable = ri->is_stable =
+ router_is_active(ri, now) &&
!dirserv_thinks_router_is_unreliable(now, ri, 1, 0) &&
!unstable_version;
int f_fast = ri->is_fast =
+ router_is_active(ri, now) &&
!dirserv_thinks_router_is_unreliable(now, ri, 0, 1);
int f_running = ri->is_running; /* computed above */
int f_authority = router_digest_is_trusted_dir(