aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-08-15 03:25:40 +0000
committerRoger Dingledine <arma@torproject.org>2005-08-15 03:25:40 +0000
commitf57d062d9c4fed001bb6dcd40d122de8d1368e0a (patch)
treeb06b9db856e88ec49fc62b819d1c671474b75bfa /src/or/circuituse.c
parent121ea4dd933b78b77189823557a5728a736a9a2f (diff)
downloadtor-f57d062d9c4fed001bb6dcd40d122de8d1368e0a.tar
tor-f57d062d9c4fed001bb6dcd40d122de8d1368e0a.tar.gz
Implement exit enclaves: if we know an IP address for the destination,
and there's a running Tor server at that address which allows exit to the destination, then extend the circuit to that exit first. Also, if the user asks for a .exit node, cannibalize general circs for it. svn:r4779
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index a1aa3d716..0fb8285ea 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -749,7 +749,7 @@ circuit_launch_by_extend_info(uint8_t purpose, extend_info_t *info,
return NULL;
}
- if (purpose != CIRCUIT_PURPOSE_C_GENERAL &&
+ if ((info || purpose != CIRCUIT_PURPOSE_C_GENERAL) &&
purpose != CIRCUIT_PURPOSE_TESTING) {
/* see if there are appropriate circs available to cannibalize. */
if ((circ = circuit_get_clean_open(CIRCUIT_PURPOSE_C_GENERAL, need_uptime,
@@ -768,6 +768,7 @@ circuit_launch_by_extend_info(uint8_t purpose, extend_info_t *info,
break;
case CIRCUIT_PURPOSE_C_INTRODUCING:
case CIRCUIT_PURPOSE_S_CONNECT_REND:
+ case CIRCUIT_PURPOSE_C_GENERAL:
/* need to add a new hop */
tor_assert(info);
if (circuit_extend_to_new_exit(circ, info) < 0)