[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9808: Stop allowing hibernating servers to be "stable" or "fast". (in tor/trunk: . doc/spec src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9808: Stop allowing hibernating servers to be "stable" or "fast". (in tor/trunk: . doc/spec src/or)
- From: arma@xxxxxxxx
- Date: Mon, 12 Mar 2007 21:59:12 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 12 Mar 2007 21:59:20 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-03-12 21:59:09 -0400 (Mon, 12 Mar 2007)
New Revision: 9808
Modified:
tor/trunk/ChangeLog
tor/trunk/doc/spec/dir-spec.txt
tor/trunk/src/or/dirserv.c
Log:
Stop allowing hibernating servers to be "stable" or "fast".
This is what I meant to do in r9690 but didn't actually do.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-03-13 01:36:12 UTC (rev 9807)
+++ tor/trunk/ChangeLog 2007-03-13 01:59:09 UTC (rev 9808)
@@ -32,7 +32,10 @@
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):
- Do not load the NT services library functions (which may not exist)
Modified: tor/trunk/doc/spec/dir-spec.txt
===================================================================
--- tor/trunk/doc/spec/dir-spec.txt 2007-03-13 01:36:12 UTC (rev 9807)
+++ tor/trunk/doc/spec/dir-spec.txt 2007-03-13 01:59:09 UTC (rev 9808)
@@ -425,6 +425,9 @@
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 @@
"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
Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c 2007-03-13 01:36:12 UTC (rev 9807)
+++ tor/trunk/src/or/dirserv.c 2007-03-13 01:59:09 UTC (rev 9808)
@@ -1629,9 +1629,11 @@
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(