summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-17 11:12:15 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-17 11:12:15 -0500
commit4e653ac2cab08edf0e811ae38204e61bc13f1871 (patch)
tree01a084e5532ae7d6b3616069b638bfee06233d5a /src/or/connection_or.c
parentf02c6bcad08754e0946c1ae5199cfebc9e30fe7b (diff)
parentaf8cadf3a9febe3dbe22899b828f9f7946a82cef (diff)
downloadtor-4e653ac2cab08edf0e811ae38204e61bc13f1871.tar.gz
tor-4e653ac2cab08edf0e811ae38204e61bc13f1871.zip
Merge branch 'maint-0.3.1' into maint-0.3.2
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9e34063609..fd8c5fc7f2 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1954,6 +1954,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));