diff options
author | David Goulet <dgoulet@ev0ke.net> | 2015-04-30 12:28:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-14 10:46:38 -0400 |
commit | c1ffeadff4db375886d40bb5928ddd4fe761ba9f (patch) | |
tree | a1911a7d1b60a6908f506f96604f51c90fb8c57b /src/or/rendclient.c | |
parent | 95a9920461dd3322280a13c8d99e363c91028ab2 (diff) | |
download | tor-c1ffeadff4db375886d40bb5928ddd4fe761ba9f.tar.gz tor-c1ffeadff4db375886d40bb5928ddd4fe761ba9f.zip |
Add missing descriptor ID to HS_DESC control event
For FAILED and RECEIVED action of the HS_DESC event, we now sends back the
descriptor ID at the end like specified in the control-spec section 4.1.25.
Fixes #15881
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index d0c4b87010..59e938e89c 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -686,6 +686,7 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query, routerstatus_t *rs_hsdir) { routerstatus_t *hs_dir = rs_hsdir; + char *hsdir_fp; char desc_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1]; char descriptor_cookie_base64[3*REND_DESC_COOKIE_LEN_BASE64]; #ifdef ENABLE_TOR2WEB_MODE @@ -709,6 +710,12 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query, } } + /* Add a copy of the HSDir identity digest to the query so we can track it + * on the control port. */ + hsdir_fp = tor_memdup(hs_dir->identity_digest, + sizeof(hs_dir->identity_digest)); + smartlist_add(rend_query->hsdirs_fp, hsdir_fp); + /* Encode descriptor cookie for logging purposes. Also, if the cookie is * malformed, no fetch is triggered thus this needs to be done before the * fetch request. */ |