aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-11 15:06:04 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-11 15:06:04 -0500
commitcaf28519d9a4f7f0a5fa36a0cd94fe9c0ee292dc (patch)
treedb5e6003cc8cec5f27ba0e91449348518ea98455 /src/or/circuituse.c
parent0c81dfa848da160b02818771626a425cd27b86bc (diff)
parent0899f51bc6abf535c6c55b81b98b959235b0f7c7 (diff)
downloadtor-caf28519d9a4f7f0a5fa36a0cd94fe9c0ee292dc.tar.gz
tor-caf28519d9a4f7f0a5fa36a0cd94fe9c0ee292dc.zip
Merge branch 'bug12844'
Conflicts: src/or/circuituse.c src/test/include.am src/test/test_entrynodes.c
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 612b536bad..c463b0a40f 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1677,6 +1677,7 @@ circuit_launch_by_extend_info(uint8_t purpose,
origin_circuit_t *circ;
int onehop_tunnel = (flags & CIRCLAUNCH_ONEHOP_TUNNEL) != 0;
int have_path = have_enough_path_info(! (flags & CIRCLAUNCH_IS_INTERNAL) );
+ int need_specific_rp = 0;
if (!onehop_tunnel && (!router_have_minimum_dir_info() || !have_path)) {
log_debug(LD_CIRC,"Haven't %s yet; canceling "
@@ -1687,8 +1688,17 @@ circuit_launch_by_extend_info(uint8_t purpose,
return NULL;
}
+ /* If Tor2webRendezvousPoints is enabled and we are dealing with an
+ RP circuit, we want a specific RP node so we shouldn't canibalize
+ an already existing circuit. */
+ if (get_options()->Tor2webRendezvousPoints &&
+ purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND) {
+ need_specific_rp = 1;
+ }
+
if ((extend_info || purpose != CIRCUIT_PURPOSE_C_GENERAL) &&
- purpose != CIRCUIT_PURPOSE_TESTING && !onehop_tunnel) {
+ purpose != CIRCUIT_PURPOSE_TESTING &&
+ !onehop_tunnel && !need_specific_rp) {
/* see if there are appropriate circs available to cannibalize. */
/* XXX if we're planning to add a hop, perhaps we want to look for
* internal circs rather than exit circs? -RD */