diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-25 19:30:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-26 08:32:48 -0400 |
commit | 8cc528c75067567ef32822e5bdb39535cea5d5e8 (patch) | |
tree | 2deac85d98eac5d5b3bfc60cf26742de2128a9fe /src/or/connection_edge.c | |
parent | 01482e30ad8a453f3721ef17a4a9633806b90684 (diff) | |
download | tor-8cc528c75067567ef32822e5bdb39535cea5d5e8.tar.gz tor-8cc528c75067567ef32822e5bdb39535cea5d5e8.zip |
Allow asking a bridge's own descriptor over one-hop connection
When we refactored purpose_needs_anonymity(), we made it so _all_
bridge requests required anonymity. But that missed the case
that we are allowed to ask a bridge for its own descriptor.
With this patch, we consider the resource, and allow "authority.z"
("your own descriptor, compressed") for a bridge's server descriptor
to be non-anonymous.
Fix for bug 20410; bug not in any released Tor.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 44dfcefb71..1ee0c0f5cd 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2434,7 +2434,9 @@ connection_ap_handshake_send_begin(entry_connection_t *ap_conn) * Otherwise, directory connections are typically one-hop. * This matches the earlier check for directory connection path anonymity * in directory_initiate_command_rend(). */ - if (purpose_needs_anonymity(linked_dir_conn_base->purpose, 0)) { + if (purpose_needs_anonymity(linked_dir_conn_base->purpose, + TO_DIR_CONN(linked_dir_conn_base)->router_purpose, + TO_DIR_CONN(linked_dir_conn_base)->requested_resource)) { assert_circ_anonymity_ok(circ, options); } } else { |