diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-12 10:15:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-12 10:26:59 -0400 |
commit | 5cbeb6080596c4442a19cffb56c1a68316b3014a (patch) | |
tree | 043af62c2910bcc6797f47560ff2721c3ba11b80 /src/or/rendclient.c | |
parent | 75c9ccd4f851bac6d32cb08ded557ac207bc8002 (diff) | |
download | tor-5cbeb6080596c4442a19cffb56c1a68316b3014a.tar.gz tor-5cbeb6080596c4442a19cffb56c1a68316b3014a.zip |
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.
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 5b3b92e406..0b6d82bdf4 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -617,7 +617,8 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query) directory_initiate_command_routerstatus_rend(hs_dir, DIR_PURPOSE_FETCH_RENDDESC_V2, ROUTER_PURPOSE_GENERAL, - !tor2web_mode, desc_id_base32, + tor2web_mode?DIRIND_ONEHOP:DIRIND_ANONYMOUS, + desc_id_base32, NULL, 0, 0, rend_query); log_info(LD_REND, "Sending fetch request for v2 descriptor for " |