summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.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/connection_edge.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/connection_edge.c')
-rw-r--r--src/or/connection_edge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8335a42a0d..f62984259e 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2292,8 +2292,7 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
return 0;
}
} else if (rh.command == RELAY_COMMAND_BEGIN_DIR) {
- or_options_t *options = get_options();
- if (!directory_permits_begindir_requests(options) ||
+ if (!directory_permits_begindir_requests(get_options()) ||
circ->purpose != CIRCUIT_PURPOSE_OR) {
end_payload[0] = END_STREAM_REASON_NOTDIRECTORY;
relay_send_command_from_edge(rh.stream_id, circ, RELAY_COMMAND_END,