/* We're done with measurement circuits here. Just close them */
if (circ->base_.purpose == CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
- /* If a measurement circ ever gets back to us, consider it
- * succeeded for path bias */
- circ->path_state = PATH_STATE_USE_SUCCEEDED;
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
}
return 0;
return -1;
}
- /* Set timestamp_dirty, so we can check it for path use bias */
- if (!circ->base_.timestamp_dirty)
- circ->base_.timestamp_dirty = time(NULL);
+ // XXX: Should cannibalized circuits be dirty or not? Not easy to say..
return 0;
}
circuit_build_times_set_timeout(&circ_times);
}
}
-
- if (TO_ORIGIN_CIRCUIT(victim)->has_opened &&
- victim->purpose != CIRCUIT_PURPOSE_PATH_BIAS_TESTING) {
- /* For path bias: we want to let these guys live for a while
- * so we get a chance to test them. */
- log_info(LD_CIRC,
- "Allowing cannibalized circuit %d time to finish building "
- "as a pathbias testing circ.",
- TO_ORIGIN_CIRCUIT(victim)->global_identifier);
- circuit_change_purpose(victim, CIRCUIT_PURPOSE_PATH_BIAS_TESTING);
- continue; /* It now should have a longer timeout next time */
- }
}
/* If this is a hidden service client circuit which is far enough
* If we decide to probe the initial portion of these circs,
* (up to the adversaries final hop), we need to remove this.
*/
- circ->path_state = PATH_STATE_USE_SUCCEEDED;
+
/* This must be called before the purpose change */
pathbias_check_close(circ, END_CIRC_REASON_FINISHED);
}