From 5cbeb6080596c4442a19cffb56c1a68316b3014a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 12 Sep 2012 10:15:58 -0400 Subject: Fix directory self-testing logic When I removed version_supports_begindir, I accidentally removed the mechanism we had been using to make a directory cache self-test its directory port. This caused bug 6815, which caused 6814 (both in 0.2.4.2-alpha). To fix this bug, I'm replacing the "anonymized_connection" argument to directory_initiate_command_* with an enumeration to say how indirectly to connect to a directory server. (I don't want to reinstate the "version_supports_begindir" argument as "begindir_ok" or anything -- these functions already take too many arguments.) For safety, I made sure that passing 0 and 1 for 'indirection' gives the same result as you would have gotten before -- just in case I missed any 0s or 1s. --- src/or/rendservice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/or/rendservice.c') diff --git a/src/or/rendservice.c b/src/or/rendservice.c index bd8b13a762..394831f857 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -2782,7 +2782,8 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, directory_initiate_command_routerstatus(hs_dir, DIR_PURPOSE_UPLOAD_RENDDESC_V2, ROUTER_PURPOSE_GENERAL, - 1, NULL, desc->desc_str, + DIRIND_ANONYMOUS, NULL, + desc->desc_str, strlen(desc->desc_str), 0); base32_encode(desc_id_base32, sizeof(desc_id_base32), desc->desc_id, DIGEST_LEN); -- cgit v1.2.3-54-g00ecf