diff options
author | teor <teor@torproject.org> | 2019-08-12 09:54:35 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-08-12 09:54:35 +1000 |
commit | d253b31cec04c35c551618b9b1ffa50ae4426303 (patch) | |
tree | d99861b087d206f628aee6388ddac2613c212633 /src/core | |
parent | 31fb2bceb546fb84899e5c797e3f101b86dd8687 (diff) | |
parent | a6399da598101d8046cbf7ab2d80051fd8820e2f (diff) | |
download | tor-d253b31cec04c35c551618b9b1ffa50ae4426303.tar.gz tor-d253b31cec04c35c551618b9b1ffa50ae4426303.zip |
Merge remote-tracking branch 'tor-github/pr/1077' into maint-0.3.5
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/circuituse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c index 02bfa15fb3..000a7c36da 100644 --- a/src/core/or/circuituse.c +++ b/src/core/or/circuituse.c @@ -3066,6 +3066,12 @@ circuit_change_purpose(circuit_t *circ, uint8_t new_purpose) circ->purpose, circuit_purpose_to_string(new_purpose), new_purpose); + + /* Take specific actions if we are repurposing a hidden service circuit. */ + if (circuit_purpose_is_hidden_service(circ->purpose) && + !circuit_purpose_is_hidden_service(new_purpose)) { + hs_circ_cleanup(circ); + } } old_purpose = circ->purpose; |