diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2014-08-30 09:00:40 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-02 18:55:01 -0400 |
commit | 962765a35de4a069aba58e9cf6edb726ca22b98e (patch) | |
tree | 09c4000c58eaa01ce2e637232fbd59a05ed6afc9 /src/or/dirserv.c | |
parent | 14abf1c3f1534da308eb221fef483a293d449d4f (diff) | |
download | tor-962765a35de4a069aba58e9cf6edb726ca22b98e.tar.gz tor-962765a35de4a069aba58e9cf6edb726ca22b98e.zip |
Don't list relays w/ bw estimate of 0 in the consensus
This implements a feature from bug 13000. Instead of starting a bwauth
run with this wrong idea about their bw, relays should do the self-test
and then get measured.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 52258e875f..8395c2e414 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1051,7 +1051,8 @@ format_versions_list(config_line_t *ln) } /** Return 1 if <b>ri</b>'s descriptor is "active" -- running, valid, - * not hibernating, and not too old. Else return 0. + * not hibernating, having observed bw greater 0, and not too old. Else + * return 0. */ static int router_is_active(const routerinfo_t *ri, const node_t *node, time_t now) @@ -1061,6 +1062,8 @@ router_is_active(const routerinfo_t *ri, const node_t *node, time_t now) return 0; if (!node->is_running || !node->is_valid || ri->is_hibernating) return 0; + if (!ri->bandwidthcapacity) + return 0; return 1; } |