aboutsummaryrefslogtreecommitdiff
path: root/src/or/consdiffmgr.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-14 20:06:46 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-15 17:21:55 -0400
commit7591518d163de1367cd21e1fc610960ab83993e0 (patch)
treea98e3ab3b968acf97caa4d851d1be01d12b3a75e /src/or/consdiffmgr.c
parentfd1190581dd1d33e32ae97bf705cd4b470911f09 (diff)
downloadtor-7591518d163de1367cd21e1fc610960ab83993e0.tar.gz
tor-7591518d163de1367cd21e1fc610960ab83993e0.zip
Copy valid/fresh-until and signatories values into diffs.
Diffstat (limited to 'src/or/consdiffmgr.c')
-rw-r--r--src/or/consdiffmgr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index fef5f68505..910f842070 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -1348,6 +1348,12 @@ consensus_diff_worker_threadfn(void *state_, void *work_)
const char *lv_to_valid_after =
consensus_cache_entry_get_value(job->diff_to, LABEL_VALID_AFTER);
+ const char *lv_to_fresh_until =
+ consensus_cache_entry_get_value(job->diff_to, LABEL_FRESH_UNTIL);
+ const char *lv_to_valid_until =
+ consensus_cache_entry_get_value(job->diff_to, LABEL_VALID_UNTIL);
+ const char *lv_to_signatories =
+ consensus_cache_entry_get_value(job->diff_to, LABEL_SIGNATORIES);
const char *lv_from_valid_after =
consensus_cache_entry_get_value(job->diff_from, LABEL_VALID_AFTER);
const char *lv_from_digest =
@@ -1417,6 +1423,12 @@ consensus_diff_worker_threadfn(void *state_, void *work_)
job->out[0].bodylen = difflen;
config_line_t *common_labels = NULL;
+ if (lv_to_valid_until)
+ config_line_prepend(&common_labels, LABEL_VALID_UNTIL, lv_to_valid_until);
+ if (lv_to_fresh_until)
+ config_line_prepend(&common_labels, LABEL_FRESH_UNTIL, lv_to_fresh_until);
+ if (lv_to_signatories)
+ config_line_prepend(&common_labels, LABEL_SIGNATORIES, lv_to_signatories);
cdm_labels_prepend_sha3(&common_labels,
LABEL_SHA3_DIGEST_UNCOMPRESSED,
job->out[0].body,