aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/bwauth.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-03-26 11:48:52 +1000
committerteor <teor@torproject.org>2019-03-26 11:48:52 +1000
commitb76ae3898d5d6e34c291f8e0506147a5bd4cbc07 (patch)
tree830cd3b1d074aae739701549592816f48def7103 /src/feature/dirauth/bwauth.c
parent8bc3ac6a84a11adb728f4ce49f23414c27fe84cd (diff)
parent091f8688b8ee15b57ed5bc24bac12a7a0b7f5725 (diff)
downloadtor-b76ae3898d5d6e34c291f8e0506147a5bd4cbc07.tar.gz
tor-b76ae3898d5d6e34c291f8e0506147a5bd4cbc07.zip
Merge branch 'ticket29806_035_squashed_merged' into ticket29806_040_squashed_merged
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 7d7dea4dfa..1cfd8119df 100644
--- a/src/feature/dirauth/bwauth.c
+++ b/src/feature/dirauth/bwauth.c
@@ -384,7 +384,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) {