]> git.ipfire.org Git - thirdparty/tor.git/commit
Upload descriptor when all intro points are ready
authorDavid Goulet <dgoulet@ev0ke.net>
Mon, 1 Jun 2015 17:17:37 +0000 (13:17 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 9 Jul 2015 16:02:11 +0000 (12:02 -0400)
commitd67bf8b2f2376096ada2b1ea1c6cd19ddbed9ead
tree7483b0d982ff671c98edabaf3cdef98e2b7ef3ed
parent1125a4876b455d41b4c858cc97e8f8feef0fa8d0
Upload descriptor when all intro points are ready

To upload a HS descriptor, this commits makes it that we wait for all
introduction point to be fully established.

Else, the HS ends up uploading a descriptor that may contain intro points
that are not yet "valid" meaning not yet established or proven to work. It
could also trigger three uploads for the *same* descriptor if every intro
points takes more than 30 seconds to establish because of desc_is_dirty
being set at each intro established.

To achieve that, n_intro_points_established varialbe is added to the
rend_service_t object that is incremented when we established introduction
point and decremented when we remove a valid intro point from our list.

The condition to upload a descriptor also changes to test if all intro
points are ready by making sure we have equal or more wanted intro points
that are ready.

The desc_id_dirty flag is kept to be able to still use the
RendInitialPostPeriod option.

This partially fixes #13483.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
src/or/or.h
src/or/rendservice.c