diff options
author | David Goulet <dgoulet@torproject.org> | 2017-12-04 11:49:48 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-12-05 10:55:41 -0500 |
commit | e80893e51b0c0320838cbed8c46fd5b0fe608bef (patch) | |
tree | 86baba40b85f098f6e5954dc7aa303a84d95e806 /src/or/hs_common.h | |
parent | ba63c4099a491c3f96160005f94cf3a61433c145 (diff) | |
download | tor-e80893e51b0c0320838cbed8c46fd5b0fe608bef.tar.gz tor-e80893e51b0c0320838cbed8c46fd5b0fe608bef.zip |
hs-v3: Cleanup HS circuits when marking as closed
First, hs_service_intro_circ_has_closed() is now called in circuit_mark_for
close() because the HS subsystem needs to learn when an intro point is
actually not established anymore as soon as possible. There is a time window
between a close and a free.
Second, when we mark for close, we also remove it from the circuitmap because
between the close and the free, a service can launch an new circuit to that
same intro point and thus register it which only succeeds if the intro point
authentication key is not already in the map.
However, we still do a remove from the circuitmap in circuit_free() in order
to also cleanup the circuit if it wasn't marked for close prior to the free.
Fixes #23603
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r-- | src/or/hs_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h index c95e59a6f8..18c4e70141 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -161,6 +161,8 @@ typedef struct hsdir_index_t { void hs_init(void); void hs_free_all(void); +void hs_cleanup_circ(circuit_t *circ); + int hs_check_service_private_dir(const char *username, const char *path, unsigned int dir_group_readable, unsigned int create); |