summaryrefslogtreecommitdiff
path: root/src/or/directory.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-25 19:30:50 -0400
committerNick Mathewson <nickm@torproject.org>2016-10-26 08:32:48 -0400
commit8cc528c75067567ef32822e5bdb39535cea5d5e8 (patch)
tree2deac85d98eac5d5b3bfc60cf26742de2128a9fe /src/or/directory.h
parent01482e30ad8a453f3721ef17a4a9633806b90684 (diff)
downloadtor-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/directory.h')
-rw-r--r--src/or/directory.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/directory.h b/src/or/directory.h
index f04e7ab315..f1cdd9fcfe 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -132,7 +132,8 @@ int download_status_get_n_failures(const download_status_t *dls);
int download_status_get_n_attempts(const download_status_t *dls);
time_t download_status_get_next_attempt_at(const download_status_t *dls);
-int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose);
+int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose,
+ const char *resource);
#ifdef TOR_UNIT_TESTS
/* Used only by directory.c and test_dir.c */