]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't cannibalize already cannibalized circuits
authorSebastian Hahn <sebastian@torproject.org>
Sat, 25 Feb 2012 16:58:09 +0000 (17:58 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Sat, 25 Feb 2012 16:59:21 +0000 (17:59 +0100)
This ensures we don't build circuits that have 5 hops or more. Patch
contributed by wanoskarnet, thanks!

changes/bug5231 [new file with mode: 0644]
src/or/circuitlist.c

diff --git a/changes/bug5231 b/changes/bug5231
new file mode 100644 (file)
index 0000000..f64f7b6
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Ensure we don't cannibalize circuits that are longer than three hops
+      already, so we don't end up making circuits with 5 or more hops. Patch
+      contributed by wanoskarnet. Fixes bug 5231; bugfix on 0.1.0.1-rc which
+      introduced cannibalization.
index 49a9b0541c3c591d139711192c59328b0cf6754d..85f529194b3c5ebddd7a909324326edfeaaddc30 100644 (file)
@@ -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) {