put in the support for 'router twins'

basically, a twin is a router which is different except it shares
the same keypair. so in cases where we want to find a "next router"
and all we really care is that it can decrypt the next onion layer,
then a twin is just as good.

we still need to decide how to mark twins in the routerinfo_t and in
the routers config file.


svn:r30
This commit is contained in:
Roger Dingledine
2002-07-08 08:59:15 +00:00
parent b86fecbf47
commit 0a3da3ae37
7 changed files with 26 additions and 7 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ void command_process_create_cell(cell_t *cell, connection_t *conn) {
}
if(circ->n_addr && circ->n_port) { /* must send create cells to the next router */
n_conn = connection_get_by_addr_port(circ->n_addr,circ->n_port);
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
* possible here. I'm not sure if it would be a bug or a feature. -RD