[tor-commits] [tor/release-0.3.5] Move bandwidth-file-headers line to appear in the correct vote section
teor at torproject.org
teor at torproject.org
Mon Aug 12 03:13:19 UTC 2019
commit 0ab4dc7ef7c6468c1d0d87a7cbc834217214f16b
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Apr 29 13:43:50 2019 -0400
Move bandwidth-file-headers line to appear in the correct vote section
Fixes bug 30316; bugfix on 0.3.5.1-alpha.
---
changes/bug30316 | 4 ++++
src/feature/dirauth/dirvote.c | 7 +++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/changes/bug30316 b/changes/bug30316
new file mode 100644
index 000000000..3e396318a
--- /dev/null
+++ b/changes/bug30316
@@ -0,0 +1,4 @@
+ o Minor bugfixes (directory authority):
+ - Move the "bandwidth-file-headers" line in directory authority votes
+ so that it conforms to dir-spec.txt. Fixes bug 30316; bugfix on
+ 0.3.5.1-alpha.
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 5e426b0f8..af8b3dc20 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -322,10 +322,10 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
"known-flags %s\n"
"flag-thresholds %s\n"
"params %s\n"
+ "%s" /* bandwidth file headers */
"dir-source %s %s %s %s %d %d\n"
"contact %s\n"
"%s" /* shared randomness information */
- "%s" /* bandwidth file headers */
,
v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion",
methods,
@@ -338,13 +338,12 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
flags,
flag_thresholds,
params,
+ bw_headers_line ? bw_headers_line : "",
voter->nickname, fingerprint, voter->address,
fmt_addr32(addr), voter->dir_port, voter->or_port,
voter->contact,
shared_random_vote_str ?
- shared_random_vote_str : "",
- bw_headers_line ?
- bw_headers_line : "");
+ shared_random_vote_str : "");
tor_free(params);
tor_free(flags);
More information about the tor-commits
mailing list