[or-cvs] Defense in depth: fix the reachability bug a second way too.
arma at seul.org
arma at seul.org
Tue Jun 13 05:51:30 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
circuitbuild.c
Log Message:
Defense in depth: fix the reachability bug a second way too.
Now if we establish a connection with the right digest, regardless
of what the addr/port is, and we have pending create cells, use it.
Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -p -d -r1.243 -r1.244
--- circuitbuild.c 10 Jun 2006 00:26:38 -0000 1.243
+++ circuitbuild.c 13 Jun 2006 05:51:28 -0000 1.244
@@ -420,16 +420,8 @@ circuit_n_conn_done(connection_t *or_con
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);
More information about the tor-commits
mailing list