aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-25 08:08:56 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-25 08:08:56 +0000
commitfe221f3dff3fa1c79213f04261e4c7a70576b619 (patch)
treea1dc14128e52ea005a5953489fbb651cba3b046f /src/or/circuitlist.c
parent6452aecedb2b0c498dcc7acddaca062c0b02bcc4 (diff)
downloadtor-fe221f3dff3fa1c79213f04261e4c7a70576b619.tar.gz
tor-fe221f3dff3fa1c79213f04261e4c7a70576b619.zip
Start the process of treating internal circuits and exit circuits
separately. It's important to keep them separate because internal circuits have their last hops picked like middle hops, rather than like exit hops. So exiting on them will break the user's expectations. - Stop cannibalizing internal circuits for general exits, and stop cannibalizing exit circuits for rendezvous stuff. - Don't let new exit streams attach to internal circuits. - When deciding if we have enough circuits for internal and for exit, don't count the wrong ones. - Treat predicted resolves as predicted port 80 exits. svn:r5457
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index ae7e4309c7..ea620b102e 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -552,10 +552,10 @@ circuit_get_rendezvous(const char *cookie)
* if required, and if info is defined, does not already use info
* as any of its hops; or NULL if no circuit fits this description.
*
- * Avoid returning need_uptime circuits if not necessary.
+ * Return need_uptime circuits if that is requested; and if it's not
+ * requested, return non-uptime circuits if possible, else either.
*
- * FFFF As a more important goal, not yet implemented, avoid returning
- * internal circuits if not necessary.
+ * Only return internal circuits if that is requested.
*/
circuit_t *
circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
@@ -575,7 +575,7 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
!circ->timestamp_dirty &&
(!need_uptime || circ->build_state->need_uptime) &&
(!need_capacity || circ->build_state->need_capacity) &&
- (!internal || circ->build_state->is_internal)) {
+ (internal == circ->build_state->is_internal)) {
if (info) {
/* need to make sure we don't duplicate hops */
crypt_path_t *hop = circ->cpath;