[tor-bugs] #13000 [Tor]: Should relays wait with publishing a descriptor until they've run a bw self-test?
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Aug 30 02:27:43 UTC 2014
#13000: Should relays wait with publishing a descriptor until they've run a bw
self-test?
---------------------------+-----------------
Reporter: Sebastian | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
---------------------------+-----------------
Comment (by Sebastian):
(it still doesn't get rid of the race condition where a descriptor is
included in the consensus with no observed bw. Should we just filter these
like we filter hibernating relays?)
Like so:
{{{
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 52258e8..3e94d33 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 (!node->bandwidthcapacity)
+ return 0;
return 1;
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13000#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list