summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-17 11:13:18 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-17 11:13:18 -0500
commit959af2024789c32a3daa74360a173fb16cf092fd (patch)
treed058ba1703c120109530398764835cb9a1a4b2c6 /src
parent86aa7f0a3f26a02e240e64f844b8072dbe424379 (diff)
parent4e653ac2cab08edf0e811ae38204e61bc13f1871 (diff)
downloadtor-959af2024789c32a3daa74360a173fb16cf092fd.tar.gz
tor-959af2024789c32a3daa74360a173fb16cf092fd.zip
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src')
-rw-r--r--src/or/command.c6
-rw-r--r--src/or/connection_or.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/or/command.c b/src/or/command.c
index ae419ad068..bd70e37a07 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -328,12 +328,6 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
if (connection_or_digest_is_known_relay(chan->identity_digest)) {
rep_hist_note_circuit_handshake_requested(create_cell->handshake_type);
- // Needed for chutney: Sometimes relays aren't in the consensus yet, and
- // get marked as clients. This resets their channels once they appear.
- // Probably useful for normal operation wrt relay flapping, too.
- channel_clear_client(chan);
- } else {
- channel_mark_client(chan);
}
if (create_cell->handshake_type != ONION_HANDSHAKE_TYPE_FAST) {
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index a877761491..8379f58030 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1970,6 +1970,12 @@ connection_or_set_state_open(or_connection_t *conn)
connection_or_change_state(conn, OR_CONN_STATE_OPEN);
control_event_or_conn_status(conn, OR_CONN_EVENT_CONNECTED, 0);
+ /* Link protocol 3 appeared in Tor 0.2.3.6-alpha, so any connection
+ * that uses an earlier link protocol should not be treated as a relay. */
+ if (conn->link_proto < 3) {
+ channel_mark_client(TLS_CHAN_TO_BASE(conn->chan));
+ }
+
or_handshake_state_free(conn->handshake_state);
conn->handshake_state = NULL;
connection_start_reading(TO_CONN(conn));