aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-08-02 10:48:39 -0400
committerNick Mathewson <nickm@torproject.org>2011-08-02 10:48:39 -0400
commit6596aa022f03bad34a3ee9cbd627fefe55c01d54 (patch)
treecf6ea9a451ed365e59c5b8a0389e614636672f90 /src/or/connection.c
parent478785a762ebbfc1c95192d9cfd4617bd87d9d16 (diff)
downloadtor-6596aa022f03bad34a3ee9cbd627fefe55c01d54.tar
tor-6596aa022f03bad34a3ee9cbd627fefe55c01d54.tar.gz
Implement protocol-type isolation correctly.
Previously we'd just looked at the connection type, but that's always CONN_TYPE_AP. Instead, we should be looking at the type of the listener that created the connection. Spotted by rransom; fixes bug 3636.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index c4b320ed4..b885d094c 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1251,6 +1251,7 @@ connection_init_accepted_conn(connection_t *conn,
TO_EDGE_CONN(conn)->isolation_flags = listener->isolation_flags;
TO_EDGE_CONN(conn)->session_group = listener->session_group;
TO_EDGE_CONN(conn)->nym_epoch = get_signewnym_epoch();
+ TO_EDGE_CONN(conn)->socks_request->listener_type = listener->_base.type;
switch (TO_CONN(listener)->type) {
case CONN_TYPE_AP_LISTENER:
conn->state = AP_CONN_STATE_SOCKS_WAIT;