summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-01-07 00:30:12 +0000
committerRoger Dingledine <arma@torproject.org>2009-01-07 00:30:12 +0000
commit18ffea77ae42a91e0028437f6c58253e2e3b0e99 (patch)
tree3c01d3e7c6fd38ddf5dcc457a4f87720dc7e5ca7 /src/or/circuituse.c
parentbf33182459a09461dcbe744421957b676951c6bd (diff)
downloadtor-18ffea77ae42a91e0028437f6c58253e2e3b0e99.tar.gz
tor-18ffea77ae42a91e0028437f6c58253e2e3b0e99.zip
actually find the right identity_digest to blame when we get
a destroy cell from our first hop. svn:r17991
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index f2c1595c3b..ac1a64ebfa 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -800,12 +800,11 @@ circuit_build_failed(origin_circuit_t *circ)
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. */
- const char *n_conn_id = circ->_base.n_hop ?
- circ->_base.n_hop->identity_digest : NULL;
+ * to blame, blame it. Also, avoid this relay for a while, and
+ * fail any one-hop directory fetches destined for it. */
+ const char *n_conn_id = circ->cpath->extend_info->identity_digest;
if (circ->_base.n_conn) {
or_connection_t *n_conn = circ->_base.n_conn;
- if (n_conn) n_conn_id = n_conn->identity_digest;
log_info(LD_OR,
"Our circuit failed to get a response from the first hop "
"(%s:%d). I'm going to try to rotate to a better connection.",