summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2010-02-14 17:49:08 -0800
committerMike Perry <mikeperry-git@fscked.org>2010-02-22 16:52:11 -0800
commit87a0430a74800ced173bd83215921101b3ac3653 (patch)
treeb806b054779ddcf1f7f9856ea9be11b4033e27de /src/or/dirvote.c
parent931e073a4fe41909a35fac3659cd48d55f044817 (diff)
downloadtor-87a0430a74800ced173bd83215921101b3ac3653.tar.gz
tor-87a0430a74800ced173bd83215921101b3ac3653.zip
Clearly mark directory footer so we parse the new weight line.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 143c32420f..ca75fb7404 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -111,6 +111,7 @@ format_networkstatus_vote(crypto_pk_env_t *private_signing_key,
len = 8192;
len += strlen(version_lines);
len += (RS_ENTRY_LEN+MICRODESC_LINE_LEN)*smartlist_len(rl->routers);
+ len += strlen("\ndirectory-footer\n");
len += v3_ns->cert->cache_info.signed_descriptor_len;
status = tor_malloc(len);
@@ -199,6 +200,9 @@ format_networkstatus_vote(crypto_pk_env_t *private_signing_key,
}
} SMARTLIST_FOREACH_END(vrs);
+ tor_snprintf(outp, endp-outp, "directory-footer\n");
+ outp += strlen(outp);
+
{
char signing_key_fingerprint[FINGERPRINT_LEN+1];
if (tor_snprintf(outp, endp-outp, "directory-signature ")<0) {
@@ -1673,6 +1677,12 @@ networkstatus_compute_consensus(smartlist_t *votes,
}
if (consensus_method >= 9) {
+ /* Starting with consensus method 9, we clearly mark the directory
+ * footer region */
+ smartlist_add(chunks, tor_strdup("directory-footer\n"));
+ }
+
+ if (consensus_method >= 9) {
int64_t weight_scale = BW_WEIGHT_SCALE;
char *bw_weight_param = NULL;