diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-21 16:59:00 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:42:53 -0500 |
commit | 238828c92b1cc186577e44490caf4fa3870e724d (patch) | |
tree | 13493488b43275de574917f9b68d9cabb612e002 /src/or/control.c | |
parent | 36e9fbd7522fcee54b9f048bf506bfddc4bffc95 (diff) | |
download | tor-238828c92b1cc186577e44490caf4fa3870e724d.tar.gz tor-238828c92b1cc186577e44490caf4fa3870e724d.zip |
Add a new GUARD_WAIT state for circuits
This state corresponds to the WAITING_FOR_BETTER_GUARD state; it's
for circuits that are 100% constructed, but which we won't use until
we are sure that we wouldn't use circuits with a better guard.
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c index 1d7ec1b57b..9cc99b6b96 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2596,6 +2596,8 @@ getinfo_helper_events(control_connection_t *control_conn, if (circ->base_.state == CIRCUIT_STATE_OPEN) state = "BUILT"; + else if (circ->base_.state == CIRCUIT_STATE_GUARD_WAIT) + state = "GUARD_WAIT"; // XXXX prop271 must specify this. else if (circ->cpath) state = "EXTENDED"; else @@ -3379,7 +3381,8 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len, goto done; } } else { - if (circ->base_.state == CIRCUIT_STATE_OPEN) { + if (circ->base_.state == CIRCUIT_STATE_OPEN || + circ->base_.state == CIRCUIT_STATE_GUARD_WAIT) { int err_reason = 0; circuit_set_state(TO_CIRCUIT(circ), CIRCUIT_STATE_BUILDING); if ((err_reason = circuit_send_next_onion_skin(circ)) < 0) { |