diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-06 10:25:21 -0400 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-09-08 19:06:56 +0300 |
commit | b586de78e37425c3f4b79fb0da32971ed5216401 (patch) | |
tree | 36b980dbca571cbde86a2ec3baffb20b76f357c3 /src/or/hs_service.c | |
parent | 72c7f81459e087e2a0485361eb34db1023d12155 (diff) | |
download | tor-b586de78e37425c3f4b79fb0da32971ed5216401.tar.gz tor-b586de78e37425c3f4b79fb0da32971ed5216401.zip |
prop224: Use fetch and store HSDir indexes.
Based on our #23387 findings, it seems like to maintain 24/7
reachability we need to employ different logic when computing hsdir
indices for fetching vs storing. That's to guarantee that the client
will always fetch the current descriptor, while the service will always
publish two descriptors aiming to cover all possible edge cases.
For more details see the next commit and the spec branch.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r-- | src/or/hs_service.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 49dfa2c4fe..62b8ecf7fc 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -2102,8 +2102,8 @@ upload_descriptor_to_hsdir(const hs_service_t *service, /* Logging so we know where it was sent. */ { int is_next_desc = (service->desc_next == desc); - const uint8_t *index = (is_next_desc) ? hsdir->hsdir_index->next : - hsdir->hsdir_index->current; + const uint8_t *index = (is_next_desc) ? hsdir->hsdir_index->store_second: + hsdir->hsdir_index->store_first; log_info(LD_REND, "Service %s %s descriptor of revision %" PRIu64 " initiated upload request to %s with index %s", safe_str_client(service->onion_address), |