summaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirvote.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2021-09-17 18:38:32 -0700
committerNeel Chauhan <neel@neelc.org>2021-09-27 08:58:00 -0700
commitb7992d4f793f0aa965e6efde1bca5c03cce95e8e (patch)
tree17909da1d7d01e5ca21cea3392385f4498e4351e /src/feature/dirauth/dirvote.c
parentecb91e75e4770fa76c64c7b1932985de024d693e (diff)
downloadtor-b7992d4f793f0aa965e6efde1bca5c03cce95e8e.tar.gz
tor-b7992d4f793f0aa965e6efde1bca5c03cce95e8e.zip
bwauth: Add AuthDirDontVoteOnDirAuthBandwidth option to avoid giving weights to dirauths
Diffstat (limited to 'src/feature/dirauth/dirvote.c')
-rw-r--r--src/feature/dirauth/dirvote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index ffaa78b997..a00e0c0fb0 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -2265,7 +2265,8 @@ networkstatus_compute_consensus(smartlist_t *votes,
smartlist_add_asprintf(chunks, "pr %s\n", chosen_protocol_list);
}
/* Now the weight line. */
- if (rs_out.has_bandwidth) {
+ if (rs_out.has_bandwidth && (!rs_out.is_authority ||
+ !dirauth_get_options()->AuthDirDontVoteOnDirAuthBandwidth)) {
char *guardfraction_str = NULL;
int unmeasured = rs_out.bw_is_unmeasured;