summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
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;