diff options
author | Alexander Færøy <ahf@torproject.org> | 2021-10-21 12:57:37 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2021-10-21 12:57:37 +0000 |
commit | ae05f06597364f5af20254ab8cf36c65591e59d9 (patch) | |
tree | 28381d16ee0cabdd2b0bcec8861f55b17e34fe37 /src/feature/nodelist | |
parent | d320f4d2a2b8208d4576be99e85babdd387d10c2 (diff) | |
parent | 54ab43d05e67984bda5661cb9530ad8a0b1e2a7a (diff) | |
download | tor-ae05f06597364f5af20254ab8cf36c65591e59d9.tar.gz tor-ae05f06597364f5af20254ab8cf36c65591e59d9.zip |
Merge branch 'tor-gitlab/mr/452_squashed' into main
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/fmt_routerstatus.c | 3 | ||||
-rw-r--r-- | src/feature/nodelist/node_st.h | 2 | ||||
-rw-r--r-- | src/feature/nodelist/routerstatus_st.h | 2 |
3 files changed, 6 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":"", diff --git a/src/feature/nodelist/node_st.h b/src/feature/nodelist/node_st.h index b15e7154c4..df67a47ada 100644 --- a/src/feature/nodelist/node_st.h +++ b/src/feature/nodelist/node_st.h @@ -70,6 +70,8 @@ struct node_t { unsigned int is_exit:1; /**< Do we think this is an OK exit? */ unsigned int is_bad_exit:1; /**< Do we think this exit is censored, borked, * or otherwise nasty? */ + /** Is this unsuitable for use as anything besides a middle relay? */ + unsigned int is_middle_only:1; unsigned int is_hs_dir:1; /**< True iff this router is a hidden service * directory according to the authorities. */ diff --git a/src/feature/nodelist/routerstatus_st.h b/src/feature/nodelist/routerstatus_st.h index 46ff0bdeac..55b76de581 100644 --- a/src/feature/nodelist/routerstatus_st.h +++ b/src/feature/nodelist/routerstatus_st.h @@ -51,6 +51,8 @@ struct routerstatus_t { * choice as an entry guard. */ unsigned int is_bad_exit:1; /**< True iff this node is a bad choice for * an exit node. */ + unsigned int is_middle_only:1; /**< True iff this node is marked as bad + * for anything besides middle positions. */ unsigned int is_hs_dir:1; /**< True iff this router is a v2-or-later hidden * service directory. */ unsigned int is_v2_dir:1; /** True iff this router publishes an open DirPort |