summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-18 21:37:58 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-18 21:37:58 +0000
commitb63a247c6817e099ea3666cc31cd1d24a2cf8fb4 (patch)
treebeee33270cecd56979e3e051219437a98e3e34cb /src/or/router.c
parentbbbf25db4d251ae25b8fe4d5a04f98cf72f7b855 (diff)
downloadtor-b63a247c6817e099ea3666cc31cd1d24a2cf8fb4.tar.gz
tor-b63a247c6817e099ea3666cc31cd1d24a2cf8fb4.zip
Make bridge authorities test reachability of bridges.
Added two XXX020's that we need to think harder about. svn:r12859
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/or/router.c b/src/or/router.c
index e7af2d9da2..779e54e357 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -823,13 +823,14 @@ authdir_mode_v3(or_options_t *options)
{
return authdir_mode(options) && options->V3AuthoritativeDir != 0;
}
-/** Return true if we belive ourselves to be any kind of non-bridge
- * authoritative directory */
+/** Return true if we believe ourselves to be any kind of
+ * authoritative directory beyond just a hidserv authority. */
int
-authdir_mode_any_nonbridge(or_options_t *options)
+authdir_mode_any_nonhidserv(or_options_t *options)
{
return authdir_mode(options) &&
- (options->V1AuthoritativeDir ||
+ (options->BridgeAuthoritativeDir ||
+ options->V1AuthoritativeDir ||
options->V2AuthoritativeDir ||
options->V3AuthoritativeDir);
}
@@ -839,8 +840,7 @@ authdir_mode_any_nonbridge(or_options_t *options)
int
authdir_mode_handles_descs(or_options_t *options)
{
- return authdir_mode_any_nonbridge(options) ||
- authdir_mode_bridge(options);
+ return authdir_mode_any_nonhidserv(options);
}
/** Return true iff we are an authoritative directory server that
* publishes its own network statuses.
@@ -850,7 +850,7 @@ authdir_mode_publishes_statuses(or_options_t *options)
{
if (authdir_mode_bridge(options))
return 0;
- return authdir_mode_any_nonbridge(options);
+ return authdir_mode_any_nonhidserv(options);
}
/** Return true iff we are an authoritative directory server that
* tests reachability of the descriptors it learns about.
@@ -858,7 +858,7 @@ authdir_mode_publishes_statuses(or_options_t *options)
int
authdir_mode_tests_reachability(or_options_t *options)
{
- return authdir_mode_any_nonbridge(options);
+ return authdir_mode_handles_descs(options);
}
/** Return true iff we believe ourselves to be a bridge authoritative
* directory server.
@@ -868,7 +868,10 @@ authdir_mode_bridge(or_options_t *options)
{
return authdir_mode(options) && options->BridgeAuthoritativeDir != 0;
}
-/** Return true iff we try to stay connected to all ORs at once.
+/** Return true iff we once tried to stay connected to all ORs at once.
+ * FFFF this function, and the notion of staying connected to ORs, is
+ * nearly obsolete. One day there will be a proposal for getting rid of
+ * it.
*/
int
clique_mode(or_options_t *options)