aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-29 19:55:13 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-29 19:55:13 +0000
commit145ead96edc1da55027f0fed8124ad3842dfdfbc (patch)
tree040bd30b0a39d51a374cac933a370b08ce53e979 /src/or/circuitlist.c
parenta332805a55ce750ea3238b4e758a7542d0afcd1b (diff)
downloadtor-145ead96edc1da55027f0fed8124ad3842dfdfbc.tar.gz
tor-145ead96edc1da55027f0fed8124ad3842dfdfbc.zip
Do not cannibalize a circuit that has run out of RELAY_EARLY cells. Partial bug 878 fix.
svn:r17814
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 4e5d603e1e..c807aaa457 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -896,7 +896,8 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
origin_circuit_t *circ = TO_ORIGIN_CIRCUIT(_circ);
if ((!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) &&
+ circ->remaining_relay_early_cells) {
if (info) {
/* need to make sure we don't duplicate hops */
crypt_path_t *hop = circ->cpath;