mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Bug 40811: Count conflux leg launch attempts early.
Also, double check that the consensus has enough overall exits before attempting conflux set launch.
This commit is contained in:
parent
44368a727a
commit
44cd704636
@ -1140,6 +1140,11 @@ conflux_launch_leg(const uint8_t *nonce)
|
|||||||
fmt_nonce(nonce));
|
fmt_nonce(nonce));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Increase the retry count for this conflux object as in this nonce.
|
||||||
|
* We must do this now, because some of the maze's early failure paths
|
||||||
|
* call right back into this function for relaunch. */
|
||||||
|
unlinked->cfx->num_leg_launch++;
|
||||||
|
|
||||||
origin_circuit_t *circ =
|
origin_circuit_t *circ =
|
||||||
circuit_establish_circuit_conflux(nonce, CIRCUIT_PURPOSE_CONFLUX_UNLINKED,
|
circuit_establish_circuit_conflux(nonce, CIRCUIT_PURPOSE_CONFLUX_UNLINKED,
|
||||||
exit, flags);
|
exit, flags);
|
||||||
@ -1169,9 +1174,6 @@ conflux_launch_leg(const uint8_t *nonce)
|
|||||||
last_seq_sent, last_seq_recv,
|
last_seq_sent, last_seq_recv,
|
||||||
get_client_ux()));
|
get_client_ux()));
|
||||||
|
|
||||||
/* Increase the retry count for this conflux object as in this nonce. */
|
|
||||||
unlinked->cfx->num_leg_launch++;
|
|
||||||
|
|
||||||
unlinked_leg_add(unlinked, leg);
|
unlinked_leg_add(unlinked, leg);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -1338,7 +1340,10 @@ conflux_predict_new(time_t now)
|
|||||||
{
|
{
|
||||||
(void) now;
|
(void) now;
|
||||||
|
|
||||||
if (!conflux_is_enabled(NULL)) {
|
/* If conflux is disabled, or we have insufficient consensus exits,
|
||||||
|
* don't prebuild. */
|
||||||
|
if (!conflux_is_enabled(NULL) ||
|
||||||
|
router_have_consensus_path() != CONSENSUS_PATH_EXIT) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user