mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix a bug where an unreachable relay would establish enough
reachability testing circuits to do a bandwidth test -- if we already have a connection to the middle hop of the testing circuit, then it could establish the last hop by using the existing connection. Bugfix on 0.1.2.2-alpha, exposed when we made testing circuits no longer use entry guards in 0.2.1.3-alpha. svn:r16997
This commit is contained in:
@@ -93,6 +93,12 @@ Changes in version 0.2.1.6-alpha - 2008-09-29
|
||||
- Make DNS resolved controller events into "CLOSED", not
|
||||
"FAILED". Bugfix on 0.1.2.5-alpha. Fix by Robert Hogan. Resolves
|
||||
bug 807.
|
||||
- Fix a bug where an unreachable relay would establish enough
|
||||
reachability testing circuits to do a bandwidth test -- if
|
||||
we already have a connection to the middle hop of the testing
|
||||
circuit, then it could establish the last hop by using the existing
|
||||
connection. Bugfix on 0.1.2.2-alpha, exposed when we made testing
|
||||
circuits no longer use entry guards in 0.2.1.3-alpha.
|
||||
|
||||
o Code simplifications and refactoring:
|
||||
- Revise the connection_new functions so that a more typesafe variant
|
||||
|
||||
+6
-1
@@ -680,7 +680,12 @@ circuit_enough_testing_circs(void)
|
||||
static void
|
||||
circuit_testing_opened(origin_circuit_t *circ)
|
||||
{
|
||||
if (have_performed_bandwidth_test) {
|
||||
if (have_performed_bandwidth_test ||
|
||||
!check_whether_orport_reachable()) {
|
||||
/* either we've already done everything we want with testing circuits,
|
||||
* or this testing circuit became open due to a fluke, e.g. we picked
|
||||
* a last hop where we already had the connection open due to an
|
||||
* outgoing local circuit. */
|
||||
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_AT_ORIGIN);
|
||||
} else if (circuit_enough_testing_circs()) {
|
||||
router_perform_bandwidth_test(NUM_PARALLEL_TESTING_CIRCS, time(NULL));
|
||||
|
||||
Reference in New Issue
Block a user