summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-04 18:35:03 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-04 18:35:03 +0000
commitd46b8a3eac7983795756297cca2d69a5aa5e3ad3 (patch)
treeba91853b7e28c2bcd70d014373f98a3126923f93 /src/or/config.c
parent4a03959b10b9db3d47485e7ffb1848e1553cd601 (diff)
downloadtor-d46b8a3eac7983795756297cca2d69a5aa5e3ad3.tar.gz
tor-d46b8a3eac7983795756297cca2d69a5aa5e3ad3.zip
Stop being so aggressive about fetching dir info if your DirPort is
on but your ORPort is off. Add a new config option BridgeRelay that specifies you want to be a bridge relay. Right now the only difference is that it makes you answer begin_dir requests, and it makes you cache dir info, even if your DirPort isn't on. Refactor directory_caches_dir_info() into some more functions. svn:r12668
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index a119644b98..a8060f2269 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -144,6 +144,7 @@ static config_var_t _option_vars[] = {
V(BandwidthRate, MEMUNIT, "5 MB"),
V(BridgeAuthoritativeDir, BOOL, "0"),
VAR("Bridge", LINELIST, Bridges, NULL),
+ V(BridgeRelay, BOOL, "0"),
V(CircuitBuildTimeout, INTERVAL, "1 minute"),
V(CircuitIdleTimeout, INTERVAL, "1 hour"),
V(ClientDNSRejectInternalAddresses, BOOL,"1"),
@@ -1132,8 +1133,10 @@ options_act(or_options_t *old_options)
if (old_options) {
if (authdir_mode_v3(options) && !authdir_mode_v3(old_options))
dirvote_recalculate_timing(options, time(NULL));
- if (!bool_eq(directory_caches_dir_info(options),
- directory_caches_dir_info(old_options))) {
+ if (!bool_eq(directory_fetches_dir_info_like_mirror(options),
+ directory_fetches_dir_info_like_mirror(old_options)) ||
+ !bool_eq(directory_fetches_dir_info_like_bridge_user(options),
+ directory_fetches_dir_info_like_bridge_user(old_options))) {
/* Make sure update_router_have_min_dir_info gets called. */
router_dir_info_changed();
/* We might need to download a new consensus status later or sooner than