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/rendcommon.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/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index c3f0d32ac6..f06a5ff424 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -1400,8 +1400,14 @@ rend_process_relay_cell(circuit_t *circ, const crypt_path_t *layer_hint, rend_data_t * rend_data_dup(const rend_data_t *data) { + rend_data_t *data_dup; tor_assert(data); - return tor_memdup(data, sizeof(rend_data_t)); + data_dup = tor_memdup(data, sizeof(rend_data_t)); + data_dup->hsdirs_fp = smartlist_new(); + SMARTLIST_FOREACH(data->hsdirs_fp, char *, fp, + smartlist_add(data_dup->hsdirs_fp, + tor_memdup(fp, DIGEST_LEN))); + return data_dup; } /** Compute descriptor ID for each replicas and save them. A valid onion @@ -1495,6 +1501,7 @@ rend_data_client_create(const char *onion_address, const char *desc_id, } rend_data->auth_type = auth_type; + rend_data->hsdirs_fp = smartlist_new(); return rend_data; |