summaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-07-18 23:44:57 +0000
committerRoger Dingledine <arma@torproject.org>2002-07-18 23:44:57 +0000
commit2147898577cdf1664ffbf16f48067c18a841593d (patch)
treec37968ca751bb1721ac68a3cd6adaac13b68ee68 /src/or/command.c
parent0a8d58138df722194517ac65abe6716bf404df3b (diff)
downloadtor-2147898577cdf1664ffbf16f48067c18a841593d.tar.gz
tor-2147898577cdf1664ffbf16f48067c18a841593d.zip
Implemented router twins
I modified new_route so we don't pick twins back-to-back in the path. I also had to patch my previous uses of connection_twin_get_by_addr_port() because they assumed that "addr" and "port" would be the same for a twin as for the original router. svn:r56
Diffstat (limited to 'src/or/command.c')
-rw-r--r--src/or/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c
index 5a1ad4155d..31459ee241 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -111,6 +111,10 @@ void command_process_create_cell(cell_t *cell, connection_t *conn) {
circuit_close(circ);
return;
}
+
+ circ->n_addr = n_conn->addr; /* these are different if we found a twin instead */
+ circ->n_port = n_conn->port;
+
circ->n_conn = n_conn;
log(LOG_DEBUG,"command_process_create_cell(): n_conn is %s:%u",n_conn->address,ntohs(n_conn->port));