[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Don't list relays w/ bw estimate of 0 in the consensus



commit 962765a35de4a069aba58e9cf6edb726ca22b98e
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Sat Aug 30 09:00:40 2014 +0200

    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.
---
 changes/bug13000 |    4 +++-
 src/or/dirserv.c |    5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/changes/bug13000 b/changes/bug13000
index e537fb5..731b4d0 100644
--- a/changes/bug13000
+++ b/changes/bug13000
@@ -2,4 +2,6 @@
     - If our previous bandwidth estimate was 0 bytes, allow publishing a
       new relay descriptor immediately. Fixes bug 13000; bugfix on
       0.1.1.6-alpha.
-
+  o Minor features:
+    - Don't list relays with a bandwidth estimate of 0 in the consensus.
+      Implements a feature proposed during discussion of bug 13000.
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 52258e8..8395c2e 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;
 }
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits