summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-07-04 17:10:12 +0000
committerRoger Dingledine <arma@torproject.org>2006-07-04 17:10:12 +0000
commit32485f8d3a80514052bfaf56325d89947c66d3e2 (patch)
tree06eb4581769886adaf8a7185980140dca78e47f0
parenta4516c1e75453dec8a82c77617091b3d1bed8cb0 (diff)
downloadtor-32485f8d3a80514052bfaf56325d89947c66d3e2.tar.gz
tor-32485f8d3a80514052bfaf56325d89947c66d3e2.zip
backport the other half of the reachability bugfix.
("defense in depth") svn:r6721
-rw-r--r--src/or/circuitbuild.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 203b22d2d2..985477304e 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -420,16 +420,8 @@ circuit_n_conn_done(connection_t *or_conn, int status)
continue;
tor_assert(circ->state == CIRCUIT_STATE_OR_WAIT);
if (!circ->n_conn &&
- circ->n_addr == or_conn->addr &&
- circ->n_port == or_conn->port) {
- if (memcmp(or_conn->identity_digest, circ->n_conn_id_digest,
- DIGEST_LEN)) {
- log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
- "Pending circuit to %s:%d is intended for different digest!",
- or_conn->address, or_conn->port);
- circuit_mark_for_close(circ, END_CIRC_REASON_OR_IDENTITY);
- continue;
- }
+ !memcmp(or_conn->identity_digest, circ->n_conn_id_digest,
+ DIGEST_LEN)) {
if (!status) { /* or_conn failed; close circ */
log_info(LD_CIRC,"or_conn failed. Closing circ.");
circuit_mark_for_close(circ, END_CIRC_REASON_OR_CONN_CLOSED);