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/rendservice.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/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 52bd6683fd..f38895d5f1 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -3222,7 +3222,12 @@ rend_service_intro_has_opened(origin_circuit_t *circuit) "circuit, but we already have enough. Redefining purpose to " "general; leaving as internal."); - circuit_change_purpose(TO_CIRCUIT(circuit), CIRCUIT_PURPOSE_C_GENERAL); + if (circuit_should_use_vanguards(TO_CIRCUIT(circuit)->purpose)) { + circuit_change_purpose(TO_CIRCUIT(circuit), + CIRCUIT_PURPOSE_HS_VANGUARDS); + } else { + circuit_change_purpose(TO_CIRCUIT(circuit), CIRCUIT_PURPOSE_C_GENERAL); + } { rend_data_free(circuit->rend_data); |