diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2012-12-12 11:53:18 -0800 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2013-01-08 17:28:08 -0800 |
commit | 15fdfc2993777497883df8945c1c9138bea2b33a (patch) | |
tree | d681380bd17ea8812196f13b8ea4aaf239685997 /src/or/circuitlist.c | |
parent | 3458d904f62b2d97dce5fea6f85285ea34851724 (diff) | |
download | tor-15fdfc2993777497883df8945c1c9138bea2b33a.tar.gz tor-15fdfc2993777497883df8945c1c9138bea2b33a.zip |
Bug 7691: Send a probe cell down certain types of circs.
In general, if we tried to use a circ for a stream, but then decided to place
that stream on a different circuit, we need to probe the original circuit
before deciding it was a "success".
We also need to do the same for cannibalized circuits that go unused.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 1a7306292f..90719d2b63 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -414,6 +414,8 @@ circuit_purpose_to_controller_string(uint8_t purpose) return "MEASURE_TIMEOUT"; case CIRCUIT_PURPOSE_CONTROLLER: return "CONTROLLER"; + case CIRCUIT_PURPOSE_PATH_BIAS_TESTING: + return "PATH_BIAS_TESTING"; default: tor_snprintf(buf, sizeof(buf), "UNKNOWN_%d", (int)purpose); @@ -441,6 +443,7 @@ circuit_purpose_to_controller_hs_state_string(uint8_t purpose) case CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT: case CIRCUIT_PURPOSE_TESTING: case CIRCUIT_PURPOSE_CONTROLLER: + case CIRCUIT_PURPOSE_PATH_BIAS_TESTING: return NULL; case CIRCUIT_PURPOSE_INTRO_POINT: @@ -1356,7 +1359,10 @@ circuit_mark_for_close_(circuit_t *circ, int reason, int line, } if (CIRCUIT_IS_ORIGIN(circ)) { - pathbias_check_close(TO_ORIGIN_CIRCUIT(circ), reason); + if (pathbias_check_close(TO_ORIGIN_CIRCUIT(circ), reason) == -1) { + /* Don't close it yet, we need to test it first */ + return; + } /* We don't send reasons when closing circuits at the origin. */ reason = END_CIRC_REASON_NONE; |