aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2024-03-12 12:51:18 +0000
committerDavid Goulet <dgoulet@torproject.org>2024-03-12 12:51:18 +0000
commitd1e8c7a60361f2553c1abb1ec1a1e6a1dbc73185 (patch)
treeef235d0254ece7e6651bd14abb2481971b61fe03
parenta5d53ce4164bd8a2070435dd7887bdfd0b5480dd (diff)
parent4fc43ebdeefb2baef3908ddedc41e76c40359759 (diff)
downloadtor-d1e8c7a60361f2553c1abb1ec1a1e6a1dbc73185.tar.gz
tor-d1e8c7a60361f2553c1abb1ec1a1e6a1dbc73185.zip
Merge branch 'dont-require-bandwidthcapacity' into 'main'
In router_is_active, don't require non-zero bandwidthcapacity Closes #13000 and #40917 See merge request tpo/core/tor!801
-rw-r--r--src/feature/dirauth/voteflags.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/feature/dirauth/voteflags.c b/src/feature/dirauth/voteflags.c
index 71ee03e265..2fbac47b30 100644
--- a/src/feature/dirauth/voteflags.c
+++ b/src/feature/dirauth/voteflags.c
@@ -112,8 +112,7 @@ dirserv_thinks_router_is_unreliable(time_t now,
}
/** Return 1 if <b>ri</b>'s descriptor is "active" -- running, valid,
- * not hibernating, having observed bw greater 0, and not too old. Else
- * return 0.
+ * not hibernating, and not too old. Else return 0.
*/
static int
router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
@@ -125,20 +124,6 @@ router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
if (!node->is_running || !node->is_valid || ri->is_hibernating) {
return 0;
}
- /* Only require bandwidth capacity in non-test networks, or
- * if TestingTorNetwork, and TestingMinExitFlagThreshold is non-zero */
- if (!ri->bandwidthcapacity) {
- if (get_options()->TestingTorNetwork) {
- if (dirauth_get_options()->TestingMinExitFlagThreshold > 0) {
- /* If we're in a TestingTorNetwork, and TestingMinExitFlagThreshold is,
- * then require bandwidthcapacity */
- return 0;
- }
- } else {
- /* If we're not in a TestingTorNetwork, then require bandwidthcapacity */
- return 0;
- }
- }
return 1;
}