summaryrefslogtreecommitdiff
path: root/src/or/rendservice.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-05-29 17:45:45 -0400
committerNick Mathewson <nickm@torproject.org>2015-07-09 12:02:11 -0400
commit7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec (patch)
tree0e1c26f18d614a76042bd821abc4bc34c73e5372 /src/or/rendservice.h
parentadc04580f860b5e8cfd6d49c83fdf73764a4f8cc (diff)
downloadtor-7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec.tar.gz
tor-7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec.zip
Refactor rend_services_introduce()
The reasoning for refactoring this function is that removing the introduction point adaptative algorithm (#4862) ended up changing quite a bit rend_services_introduce(). Also, to fix some open issues (#8239, #8864 and #13483), this work had to be done. First, this removes time_expiring variable in an intro point object and INTRO_POINT_EXPIRATION_GRACE_PERIOD trickery and use an expiring_nodes list where intro nodes that should expire are moved to that list and cleaned up only once the new descriptor is successfully uploaded. The previous scheme was adding complexity and arbitrary timing to when we expire an intro point. We keep the intro points until we are sure that the new descriptor is uploaded and thus ready to be used by clients. For this, rend_service_desc_has_uploaded() is added to notify the HS subsystem that the descriptor has been successfully uploaded. The purpose of this function is to cleanup the expiring nodes and circuits if any. Secondly, this adds the remove_invalid_intro_points() function in order to split up rend_services_introduce() a bit with an extra modification to it that fixes #8864. We do NOT close the circuit nor delete the intro point if the circuit is still alive but the node was removed from the consensus. Due to possible information leak, we let the circuit and intro point object expire instead. Finally, the whole code flow is simplified and large amount of documentation has been added to mostly explain the why of things in there. Fixes #8864 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/rendservice.h')
-rw-r--r--src/or/rendservice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index b540d2c8ad..35a0bb25e6 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -125,6 +125,7 @@ int rend_service_del_ephemeral(const char *service_id);
void directory_post_to_hs_dir(rend_service_descriptor_t *renddesc,
smartlist_t *descs, smartlist_t *hs_dirs,
const char *service_id, int seconds_valid);
+void rend_service_desc_has_uploaded(const rend_data_t *rend_data);
#endif