summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-12-09 02:06:58 +0000
committerRoger Dingledine <arma@torproject.org>2003-12-09 02:06:58 +0000
commit38ce03d0e7231e0a803dffa39059e677f6938e90 (patch)
tree127e54a5b47ba8889c26376a58d581821c155efa
parentea6c4f6348fba6b365f3fb479f2953ad4f30d393 (diff)
downloadtor-38ce03d0e7231e0a803dffa39059e677f6938e90.tar.gz
tor-38ce03d0e7231e0a803dffa39059e677f6938e90.zip
close the circuit when we get a truncated cell
svn:r893
-rw-r--r--src/or/circuit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 05307769e2..c2bf755002 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -989,6 +989,13 @@ int circuit_truncated(circuit_t *circ, crypt_path_t *layer) {
assert(circ);
assert(layer);
+ /* XXX Since we don't ask for truncates currently, getting a truncated
+ * means that a connection broke or an extend failed. For now,
+ * just give up.
+ */
+ circuit_close(circ);
+ return 0;
+
while(layer->next != circ->cpath) {
/* we need to clear out layer->next */
victim = layer->next;