diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-05-02 16:20:26 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:12:26 -0400 |
commit | 0b2018a4d078a6ea47678c296c634714ab7eee94 (patch) | |
tree | 2af1bf576fd9aab1b162181705bd45caaba80415 /src/or/connection_edge.c | |
parent | 83249015c2741be55cf3d084660e6209323b5a1a (diff) | |
download | tor-0b2018a4d078a6ea47678c296c634714ab7eee94.tar.gz tor-0b2018a4d078a6ea47678c296c634714ab7eee94.zip |
Refactor legacy code to support hs_ident along with rend_data.
The legacy HS circuit code uses rend_data to match between circuits and
streams. We refactor some of that code so that it understands hs_ident
as well which is used for prop224.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 8480a35458..9c98c56baa 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -3566,8 +3566,14 @@ int connection_edge_is_rendezvous_stream(const edge_connection_t *conn) { tor_assert(conn); - if (conn->rend_data) + + if (BUG(conn->rend_data && conn->hs_ident)) { + log_warn(LD_BUG, "Connection has both rend_data and hs_ident..."); + } + + if (conn->rend_data || conn->hs_ident) { return 1; + } return 0; } |