summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-02-06 04:56:18 +0000
committerNick Mathewson <nickm@torproject.org>2006-02-06 04:56:18 +0000
commit50e1005327ebc275c1646f327b65bdff55487997 (patch)
tree352c4742c0f336c0c1e450dcef0d05aa13a1624a
parent97bff8edaa65871eda905862ea2528e1f2841f0e (diff)
downloadtor-50e1005327ebc275c1646f327b65bdff55487997.tar.gz
tor-50e1005327ebc275c1646f327b65bdff55487997.zip
Only v1 authorities get hidden service descriptors with current protocol
svn:r5924
-rw-r--r--src/or/directory.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 21f4446936..1c93f49e18 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -131,15 +131,20 @@ directory_post_to_dirservers(uint8_t purpose, const char *payload,
{
smartlist_t *dirservers;
int post_via_tor;
+ int post_to_v1_only;
router_get_trusted_dir_servers(&dirservers);
tor_assert(dirservers);
+ /* Only old dirservers handle rendezvous descriptor publishing. */
+ post_to_v1_only = (purpose == DIR_PURPOSE_UPLOAD_RENDDESC);
/* This tries dirservers which we believe to be down, but ultimately, that's
* harmless, and we may as well err on the side of getting things uploaded.
*/
SMARTLIST_FOREACH(dirservers, trusted_dir_server_t *, ds,
{
routerstatus_t *rs = &(ds->fake_status);
+ if (post_to_v1_only && !ds->is_v1_authority)
+ continue;
post_via_tor = purpose_is_private(purpose) ||
!fascist_firewall_allows_address(ds->addr,ds->dir_port);
directory_initiate_command_routerstatus(rs, purpose, post_via_tor,