From 94cecc712d023902653a1c04afbb65804c748876 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 6 Apr 2005 05:35:06 +0000 Subject: [PATCH] note some features we intend to add. svn:r4021 --- src/or/connection_or.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/or/connection_or.c b/src/or/connection_or.c index bea644f51e..aa33b1c525 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -507,6 +507,7 @@ connection_tls_finish_handshake(connection_t *conn) { log_fn(LOG_WARN, "Identity key not as expected for router at %s:%d: wanted %s but got %s", conn->address, conn->port, conn->nickname, d); control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED); + // XXX if we're an authdir_mode, forget about nickname's descriptor return -1; } } else if (strcasecmp(conn->nickname, nickname)) { @@ -515,8 +516,14 @@ connection_tls_finish_handshake(connection_t *conn) { "Other side (%s:%d) is '%s', but we tried to connect to '%s'", conn->address, conn->port, nickname, conn->nickname); control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED); + // XXX if we're an authdir_mode, forget about nickname's descriptor return -1; } + if (authdir_mode(options)) { + /* I got exactly the guy I wanted. Now go through and blow away + * descriptors for exactly this Address:ORPort that aren't this guy. */ + //XXX + } } else { if ((c=connection_get_by_identity_digest(digest_rcvd, CONN_TYPE_OR))) { log_fn(LOG_INFO,"Router '%s' is already connected on fd %d. Dropping fd %d.", nickname, c->s, conn->s);