diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-01-20 03:16:24 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2018-01-20 03:18:31 +0000 |
commit | db5b670d85febc6e3011932f8f0c7d383d4b9bea (patch) | |
tree | 185ec7f70716c45f44bd24e7b8414596d07f7acd /src/or/hs_circuit.c | |
parent | 48a51c5f8b80a359da31bc5aaac8ecd25890fe0d (diff) | |
download | tor-db5b670d85febc6e3011932f8f0c7d383d4b9bea.tar.gz tor-db5b670d85febc6e3011932f8f0c7d383d4b9bea.zip |
Bug 24946: Fix a warning message caused by a missed purpose check.
Also fix three other checks (found by inspection of all
CIRCUIT_PURPOSE_C_GENERAL occurrences).
Diffstat (limited to 'src/or/hs_circuit.c')
-rw-r--r-- | src/or/hs_circuit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c index 753c0fcd6a..2a41c1cccf 100644 --- a/src/or/hs_circuit.c +++ b/src/or/hs_circuit.c @@ -824,7 +824,11 @@ hs_circ_service_intro_has_opened(hs_service_t *service, /* Cleaning up the hidden service identifier and repurpose. */ hs_ident_circuit_free(circ->hs_ident); circ->hs_ident = NULL; - circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_GENERAL); + if (circuit_should_use_vanguards(TO_CIRCUIT(circ)->purpose)) + circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_HS_VANGUARDS); + else + circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_GENERAL); + /* Inform that this circuit just opened for this new purpose. */ circuit_has_opened(circ); /* This return value indicate to the caller that the IP object should be |