aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2012-02-25 17:58:09 +0100
committerSebastian Hahn <sebastian@torproject.org>2012-02-25 17:59:21 +0100
commit2755b09c52f78f233ed96aef41d283eb52cc89e8 (patch)
treeb3486840149a9eb44d52db8b4016ec315be510c5 /src/or/circuitlist.c
parentf7e87f41f719f4251582acf16f13921f350095a0 (diff)
downloadtor-2755b09c52f78f233ed96aef41d283eb52cc89e8.tar.gz
tor-2755b09c52f78f233ed96aef41d283eb52cc89e8.zip
Don't cannibalize already cannibalized circuits
This ensures we don't build circuits that have 5 hops or more. Patch contributed by wanoskarnet, thanks!
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 49a9b0541c..85f529194b 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1086,6 +1086,7 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
(!need_capacity || circ->build_state->need_capacity) &&
(internal == circ->build_state->is_internal) &&
circ->remaining_relay_early_cells &&
+ circ->build_state->desired_path_len == DEFAULT_ROUTE_LEN &&
!circ->build_state->onehop_tunnel &&
!circ->isolation_values_set) {
if (info) {