summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-10-31 16:53:31 -0400
committerNick Mathewson <nickm@torproject.org>2013-11-01 10:04:48 -0400
commit5de88dda0acda6914bacd1e14c2e037798c5d9d9 (patch)
treeaf0daa62ea1e2512d51b05c67a3f17f99cc4b89e /src/or/circuituse.c
parent0de71bf8eb5031b1c6539ea48627a938e200b5da (diff)
downloadtor-5de88dda0acda6914bacd1e14c2e037798c5d9d9.tar.gz
tor-5de88dda0acda6914bacd1e14c2e037798c5d9d9.zip
circuit_build_failed: distinguish "got DESTROY" case
Roger spotted this on tor-dev in his comments on proposal 221. We etect DESTROY vs everything else, since arma likes network timeout indicating failure but not overload indicating failure.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 25997ebdbe..5fe65eba05 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1382,10 +1382,11 @@ circuit_build_failed(origin_circuit_t *circ)
failed_at_last_hop = 1;
}
if (circ->cpath &&
- circ->cpath->state != CPATH_STATE_OPEN) {
- /* We failed at the first hop. If there's an OR connection
- * to blame, blame it. Also, avoid this relay for a while, and
- * fail any one-hop directory fetches destined for it. */
+ circ->cpath->state != CPATH_STATE_OPEN &&
+ ! circ->base_.received_destroy) {
+ /* We failed at the first hop for some reason other than a DESTROY cell.
+ * If there's an OR connection to blame, blame it. Also, avoid this relay
+ * for a while, and fail any one-hop directory fetches destined for it. */
const char *n_chan_id = circ->cpath->extend_info->identity_digest;
int already_marked = 0;
if (circ->base_.n_chan) {