aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuit.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-10-01 01:49:53 +0000
committerRoger Dingledine <arma@torproject.org>2003-10-01 01:49:53 +0000
commitefa8e288ef7e390a40c6ab7066c7dd0378f8e6ba (patch)
tree7c49a4cf02ab168801b175eb45f5493bc0be6f28 /src/or/circuit.c
parent91cf86d8da10b4b325d2c884a737f5c079244751 (diff)
downloadtor-efa8e288ef7e390a40c6ab7066c7dd0378f8e6ba.tar
tor-efa8e288ef7e390a40c6ab7066c7dd0378f8e6ba.tar.gz
my_routerinfo, router_is_me, and learn_my_address are obsolete
ACIs are decided now by strcmp'ing nicknames, rather than comparing addr:port svn:r529
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r--src/or/circuit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 650c53130..25bd4d312 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -789,7 +789,6 @@ int circuit_send_next_onion_skin(circuit_t *circ) {
int circuit_extend(cell_t *cell, circuit_t *circ) {
connection_t *n_conn;
aci_t aci_type;
- struct sockaddr_in me; /* my router identity */
cell_t newcell;
if(circ->n_conn) {
@@ -800,9 +799,6 @@ int circuit_extend(cell_t *cell, circuit_t *circ) {
circ->n_addr = ntohl(*(uint32_t*)(cell->payload+RELAY_HEADER_SIZE));
circ->n_port = ntohs(*(uint16_t*)(cell->payload+RELAY_HEADER_SIZE+4));
- if(learn_my_address(&me) < 0)
- return -1;
-
n_conn = connection_twin_get_by_addr_port(circ->n_addr,circ->n_port);
if(!n_conn || n_conn->type != CONN_TYPE_OR) {
/* i've disabled making connections through OPs, but it's definitely
@@ -824,8 +820,7 @@ int circuit_extend(cell_t *cell, circuit_t *circ) {
circ->n_conn = n_conn;
log_fn(LOG_DEBUG,"n_conn is %s:%u",n_conn->address,n_conn->port);
- aci_type = decide_aci_type(ntohl(me.sin_addr.s_addr), ntohs(me.sin_port),
- circ->n_addr, circ->n_port);
+ aci_type = decide_aci_type(options.Nickname, n_conn->nickname);
log_fn(LOG_DEBUG,"aci_type = %u.",aci_type);
circ->n_aci = get_unique_aci_by_addr_port(circ->n_addr, circ->n_port, aci_type);