aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-12-05 18:19:44 +0200
committerNick Mathewson <nickm@torproject.org>2013-07-18 14:59:55 -0400
commitd303228ecae1d4c5d9a242b12a4546366544a170 (patch)
treee0e1e5dcd39ec95cea27dc82cc95aac4e04a6005 /src/or/connection.c
parentba30d635c5efbbb6a9455925720196b9d56163f6 (diff)
downloadtor-d303228ecae1d4c5d9a242b12a4546366544a170.tar
tor-d303228ecae1d4c5d9a242b12a4546366544a170.tar.gz
Create the Extended ORPort authentication cookie file.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 130b1ecef..ad8e39c9a 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -592,8 +592,10 @@ connection_free_(connection_t *conn)
log_warn(LD_BUG, "called on OR conn with non-zeroed identity_digest");
connection_or_remove_from_identity_map(TO_OR_CONN(conn));
}
- if (conn->type == CONN_TYPE_OR || conn->type == CONN_TYPE_EXT_OR)
+ if (conn->type == CONN_TYPE_OR || conn->type == CONN_TYPE_EXT_OR) {
connection_or_remove_from_ext_or_id_map(TO_OR_CONN(conn));
+ tor_free(TO_OR_CONN(conn)->ext_or_conn_id);
+ }
#ifdef USE_BUFFEREVENTS
if (conn->type == CONN_TYPE_OR && TO_OR_CONN(conn)->bucket_cfg) {
@@ -4343,6 +4345,7 @@ assert_connection_ok(connection_t *conn, time_t now)
switch (conn->type) {
case CONN_TYPE_OR:
+ case CONN_TYPE_EXT_OR:
tor_assert(conn->magic == OR_CONNECTION_MAGIC);
break;
case CONN_TYPE_AP:
@@ -4447,6 +4450,9 @@ assert_connection_ok(connection_t *conn, time_t now)
case CONN_TYPE_OR:
tor_assert(conn->state >= OR_CONN_STATE_MIN_);
tor_assert(conn->state <= OR_CONN_STATE_MAX_);
+ case CONN_TYPE_EXT_OR:
+ tor_assert(conn->state >= EXT_OR_CONN_STATE_MIN_);
+ tor_assert(conn->state <= EXT_OR_CONN_STATE_MAX_);
break;
case CONN_TYPE_EXIT:
tor_assert(conn->state >= EXIT_CONN_STATE_MIN_);
@@ -4580,6 +4586,7 @@ connection_free_all(void)
/* Unlink everything from the identity map. */
connection_or_clear_identity_map();
+ connection_or_clear_ext_or_id_map();
/* Clear out our list of broken connections */
clear_broken_connection_map(0);