diff options
author | Roger Dingledine <arma@torproject.org> | 2007-06-09 07:05:19 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-06-09 07:05:19 +0000 |
commit | a97c3b8c2da5d1f1e0ac793e7ad79b8288a87bc3 (patch) | |
tree | 9d36eb6c00798193c27192fba6bfc34ab2e0775c /src/or/router.c | |
parent | 8dfde75ef68afe952058aa938f53707f98b9178c (diff) | |
download | tor-a97c3b8c2da5d1f1e0ac793e7ad79b8288a87bc3.tar.gz tor-a97c3b8c2da5d1f1e0ac793e7ad79b8288a87bc3.zip |
Be clearer on the various roles for auth dir types.
Bridge authorities no longer write bridge descriptors to their
cached-routers file -- this gets complex because of extrainfo documents.
svn:r10545
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index db433f5b52..7571b30da6 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -714,12 +714,30 @@ authdir_mode_v2(or_options_t *options) return authdir_mode(options) && options->V2AuthoritativeDir != 0; } /** Return true iff we are an authoritative directory server that - * handles descriptors -- including receiving posts, creating directories, - * and testing reachability. + * is willing to receive or serve descriptors on its dirport. */ int authdir_mode_handles_descs(or_options_t *options) { + return authdir_mode_v1(options) || authdir_mode_v2(options) || + authdir_mode_bridge(options); +} +/** Return true iff we are an authoritative directory server that + * publishes its own network statuses. + */ +int +authdir_mode_publishes_statuses(or_options_t *options) +{ + if (authdir_mode_bridge(options)) + return 0; + return authdir_mode_v1(options) || authdir_mode_v2(options); +} +/** Return true iff we are an authoritative directory server that + * tests reachability of the descriptors it learns about. + */ +int +authdir_mode_tests_reachability(or_options_t *options) +{ return authdir_mode_v1(options) || authdir_mode_v2(options); } /** Return true iff we believe ourselves to be a bridge authoritative @@ -735,7 +753,7 @@ authdir_mode_bridge(or_options_t *options) int clique_mode(or_options_t *options) { - return authdir_mode_handles_descs(options); + return authdir_mode_tests_reachability(options); } /** Return true iff we are trying to be a server. |