From 50e1005327ebc275c1646f327b65bdff55487997 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 6 Feb 2006 04:56:18 +0000 Subject: [PATCH] Only v1 authorities get hidden service descriptors with current protocol svn:r5924 --- src/or/directory.c | 5 +++++ 1 file changed, 5 insertions(+) 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,