diff options
author | David Goulet <dgoulet@torproject.org> | 2017-05-25 10:28:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:29:34 -0400 |
commit | 15864a1b70c1061a89f97a2054b1c19788af7dbc (patch) | |
tree | 97af8f4193637d96034c8d21acd56b511914ca17 /src/or/circuitlist.c | |
parent | 4a8cf17897ca23f8352a27c1bffb6ebfd68a1e0e (diff) | |
download | tor-15864a1b70c1061a89f97a2054b1c19788af7dbc.tar.gz tor-15864a1b70c1061a89f97a2054b1c19788af7dbc.zip |
prop224: Add a circuit has closed callback
When the circuit is about to be freed which has been marked close before, for
introduction circuit we now call this has_closed() callback so we can cleanup
any introduction point that have retried to many times or at least flag them
that their circuit is not established anymore.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 39ebeb5f3d..d891c89f38 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1949,6 +1949,13 @@ circuit_about_to_free(circuit_t *circ) orig_reason); } + /* Notify the HS subsystem for any intro point circuit closing so it can be + * dealt with cleanly. */ + if (circ->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO || + circ->purpose == CIRCUIT_PURPOSE_S_INTRO) { + hs_service_intro_circ_has_closed(TO_ORIGIN_CIRCUIT(circ)); + } + if (circ->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) { origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ); int timed_out = (reason == END_CIRC_REASON_TIMEOUT); |