summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2015-01-29 14:55:35 +0000
committerNick Mathewson <nickm@torproject.org>2015-02-18 09:09:33 -0500
commit7ddfb6aa2f3779da8bacd0574f152f558a5a508e (patch)
tree4cd1d8f66529fbcece18bb639d5c98f05c00d6d1 /src
parent5ee48d47a73691001746541e15b3dc5a89fa37eb (diff)
downloadtor-7ddfb6aa2f3779da8bacd0574f152f558a5a508e.tar.gz
tor-7ddfb6aa2f3779da8bacd0574f152f558a5a508e.zip
Write guardfraction information to votes.
If a dirauth has guardfraction information about a guard, write it down when serializing the routerstatus.
Diffstat (limited to 'src')
-rw-r--r--src/or/dirserv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 0d3e7823c6..10b9e63894 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1922,6 +1922,13 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
smartlist_add_asprintf(chunks,
" Measured=%d", vrs->measured_bw_kb);
}
+ /* Write down guardfraction information if we have it. */
+ if (format == NS_V3_VOTE && vrs && vrs->status.has_guardfraction) {
+ smartlist_add_asprintf(chunks,
+ " GuardFraction=%d",
+ vrs->status.guardfraction_percentage);
+ }
+
smartlist_add(chunks, tor_strdup("\n"));
if (desc) {