diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-12-03 12:18:45 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-03 12:18:45 -0500 |
commit | 32213fa9ad8a306e1f3bade1c95b1ad95a136bd9 (patch) | |
tree | 31c76ba117d341f75e993ecab074d4dcae4be4aa /src/feature/dirauth/dirvote.c | |
parent | 439ffcefd57031153e49e605389a1c218e737180 (diff) | |
download | tor-32213fa9ad8a306e1f3bade1c95b1ad95a136bd9.tar.gz tor-32213fa9ad8a306e1f3bade1c95b1ad95a136bd9.zip |
Keep list of dirauth flags in sync between dirvote.c and fuzz_vrs.c
Suggested by Teor on PR
Diffstat (limited to 'src/feature/dirauth/dirvote.c')
-rw-r--r-- | src/feature/dirauth/dirvote.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index aa4242f678..c6a2193087 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -4372,6 +4372,23 @@ clear_status_flags_on_sybil(routerstatus_t *rs) * forget to add it to this clause. */ } +/** Space-separated list of all the flags that we will always vote on. */ +const char DIRVOTE_UNIVERSAL_FLAGS[] = + "Authority " + "Exit " + "Fast " + "Guard " + "HSDir " + "Stable " + "StaleDesc " + "V2Dir " + "Valid"; +/** Space-separated list of all flags that we may or may not vote on, + * depending on our configuration. */ +const char DIRVOTE_OPTIONAL_FLAGS[] = + "BadExit " + "Running"; + /** Return a new networkstatus_t* containing our current opinion. (For v3 * authorities) */ networkstatus_t * @@ -4620,8 +4637,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, v3_out->known_flags = smartlist_new(); smartlist_split_string(v3_out->known_flags, - "Authority Exit Fast Guard Stable V2Dir Valid HSDir " - "StaleDesc", + DIRVOTE_UNIVERSAL_FLAGS, 0, SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0); if (vote_on_reachability) smartlist_add_strdup(v3_out->known_flags, "Running"); |