aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/bwauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/dirauth/bwauth.c')
-rw-r--r--src/feature/dirauth/bwauth.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/feature/dirauth/bwauth.c b/src/feature/dirauth/bwauth.c
index a31050ff9c..12f9399e9f 100644
--- a/src/feature/dirauth/bwauth.c
+++ b/src/feature/dirauth/bwauth.c
@@ -366,7 +366,13 @@ measured_bw_line_parse(measured_bw_line_t *out, const char *orig_line,
}
do {
- if (strcmpstart(cp, "bw=") == 0) {
+ // If the line contains vote=0, ignore it.
+ if (strcmpstart(cp, "vote=0") == 0) {
+ log_debug(LD_DIRSERV, "Ignoring bandwidth file line that contains "
+ "vote=0: %s",escaped(orig_line));
+ tor_free(line);
+ return -1;
+ } else if (strcmpstart(cp, "bw=") == 0) {
int parse_ok = 0;
char *endptr;
if (got_bw) {