aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 09cca95b64..3a352d47fe 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -514,7 +514,7 @@ channel_tls_get_remote_addr_method(channel_t *chan, tor_addr_t *addr_out)
tor_assert(addr_out);
if (tlschan->conn) {
- tor_addr_copy(addr_out, &(TO_CONN(tlschan->conn)->addr));
+ tor_addr_copy(addr_out, &(tlschan->conn->real_addr));
rv = 1;
} else tor_addr_make_unspec(addr_out);
@@ -1640,6 +1640,10 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan)
tor_assert(tor_digest_is_zero(
(const char*)(chan->conn->handshake_state->
authenticated_peer_id)));
+ /* If the client never authenticated, it's a tor client or bridge
+ * relay, and we must not use it for EXTEND requests (nor could we, as
+ * there are no authenticated peer IDs) */
+ channel_mark_client(TLS_CHAN_TO_BASE(chan));
channel_set_circid_type(TLS_CHAN_TO_BASE(chan), NULL,
chan->conn->link_proto < MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS);