tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 1b42ee2849f844793fdb0e3da6619de41fd0525e
parent 5944e8aa243460a8e374c4a1f616659711f5bdcb
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri, 25 Apr 2025 10:24:50 -0400

Restore a pair of erroneously removed cases

The one in connection_or.c was crucial: it's the
thing that made OR negotiation actually work.

The one in channeltls.c was just defensive programming, but it's
valid defensive programming: by the time we enter from
channel_handle_var_cell, channel_tls_process_vesions_cell,
we have changed our state via enter_v3_handshake_with_cell.

Diffstat:
Msrc/core/or/channeltls.c | 1+
Msrc/core/or/connection_or.c | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c @@ -1476,6 +1476,7 @@ channel_tls_process_versions_cell(var_cell_t *cell, channel_tls_t *chan) case OR_CONN_STATE_OR_HANDSHAKING_V3: break; case OR_CONN_STATE_TLS_HANDSHAKING: + case OR_CONN_STATE_SERVER_VERSIONS_WAIT: default: log_fn(LOG_PROTOCOL_WARN, LD_OR, "VERSIONS cell while in unexpected state"); diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c @@ -597,6 +597,7 @@ connection_or_process_inbuf(or_connection_t *conn) return ret; case OR_CONN_STATE_OPEN: + case OR_CONN_STATE_SERVER_VERSIONS_WAIT: case OR_CONN_STATE_OR_HANDSHAKING_V3: return connection_or_process_cells_from_inbuf(conn); default: