diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-08-24 16:17:26 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-08-25 14:41:06 +0300 |
commit | c980be951157b68e6bd658ce01850e96ce97d422 (patch) | |
tree | bb4a27b22019fa2292ea91bd86b45ab67e3a7155 /src/or/hs_service.h | |
parent | 8b8e39e04b365eefd7d69a488c04405cd6371645 (diff) | |
download | tor-c980be951157b68e6bd658ce01850e96ce97d422.tar.gz tor-c980be951157b68e6bd658ce01850e96ce97d422.zip |
prop224: Refactor descriptor reupload logic.
We refactor the descriptor reupload logic to be similar to the v2 logic
where we update a global 'consider_republishing_rend_descriptors' flag
and then we use that to check for hash ring changes during the global
hidden service callbacks.
This fixes bugs where we would inspect the hash ring immediately as we
receive new dirinfo (e.g. consensus) but before running the hidden
service housekeeping events. That was leaving us in an inconsistent
state wrt hsdir indices and causing bugs all around.
Diffstat (limited to 'src/or/hs_service.h')
-rw-r--r-- | src/or/hs_service.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/hs_service.h b/src/or/hs_service.h index 5bd19931fc..d902e0b2c7 100644 --- a/src/or/hs_service.h +++ b/src/or/hs_service.h @@ -280,6 +280,10 @@ int hs_service_receive_introduce2(origin_circuit_t *circ, void hs_service_intro_circ_has_closed(origin_circuit_t *circ); +int service_desc_hsdirs_changed(const hs_service_t *service, + const hs_service_descriptor_t *desc); + + #ifdef HS_SERVICE_PRIVATE #ifdef TOR_UNIT_TESTS |