aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/fmt_routerstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-10-08 11:14:53 -0400
committerAlexander Færøy <ahf@torproject.org>2021-10-21 12:57:20 +0000
commitfc542167cb568fc3805275e2405990423cf87e3b (patch)
tree92e4f3b18751d4af3e222cc137e732345d0d3e34 /src/feature/nodelist/fmt_routerstatus.c
parentba5a71b91325b52f27fff76b736af9ddd16ba540 (diff)
downloadtor-fc542167cb568fc3805275e2405990423cf87e3b.tar.gz
tor-fc542167cb568fc3805275e2405990423cf87e3b.zip
Implement a MiddleOnly flag for vote generation.
This proposal implements part of Prop335; it's based on a patch from Neel Chauhan. When configured to do so, authorities will assign a MiddleOnly flag to certain relays. Any relay which an authority gives this flag will not get Exit, V2Dir, Guard, or HSDir, and might get BadExit if the authority votes for that one.
Diffstat (limited to 'src/feature/nodelist/fmt_routerstatus.c')
-rw-r--r--src/feature/nodelist/fmt_routerstatus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/nodelist/fmt_routerstatus.c b/src/feature/nodelist/fmt_routerstatus.c
index 6db40c0b68..95379a7721 100644
--- a/src/feature/nodelist/fmt_routerstatus.c
+++ b/src/feature/nodelist/fmt_routerstatus.c
@@ -87,7 +87,7 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
goto done;
smartlist_add_asprintf(chunks,
- "s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
/* These must stay in alphabetical order. */
rs->is_authority?" Authority":"",
rs->is_bad_exit?" BadExit":"",
@@ -95,6 +95,7 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
rs->is_fast?" Fast":"",
rs->is_possible_guard?" Guard":"",
rs->is_hs_dir?" HSDir":"",
+ rs->is_middle_only?" MiddleOnly":"",
rs->is_flagged_running?" Running":"",
rs->is_stable?" Stable":"",
rs->is_staledesc?" StaleDesc":"",