diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2012-12-08 12:07:58 -0800 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2012-12-08 12:07:58 -0800 |
commit | 5f733ccd7382e8bb8289e4f8adf07f8ac001c28a (patch) | |
tree | 0b64d654fe91909e1b15f79008b267001cee8bf4 /src/or/circuituse.c | |
parent | 26fa47226cab49b260ba764aa050880f71927ea0 (diff) | |
download | tor-5f733ccd7382e8bb8289e4f8adf07f8ac001c28a.tar.gz tor-5f733ccd7382e8bb8289e4f8adf07f8ac001c28a.zip |
Fix some hidden service edge cases.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 77822a36ad..9362e2420f 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1402,6 +1402,16 @@ circuit_launch_by_extend_info(uint8_t purpose, build_state_get_exit_nickname(circ->build_state), purpose, circuit_purpose_to_string(purpose)); + if (purpose == CIRCUIT_PURPOSE_S_CONNECT_REND && + circ->path_state == PATH_STATE_BUILD_SUCCEEDED) { + /* Path bias: Cannibalized rends pre-emptively count as a + * successfully used circ. We don't wait until the extend, + * because the rend point could be malicious. */ + circ->path_state = PATH_STATE_USE_SUCCEEDED; + /* This must be called before the purpose change */ + pathbias_check_close(circ); + } + circuit_change_purpose(TO_CIRCUIT(circ), purpose); /* Reset the start date of this circ, else expire_building * will see it and think it's been trying to build since it |