From: Nick Mathewson Date: Fri, 25 Apr 2025 14:24:50 +0000 (-0400) Subject: Restore a pair of erroneously removed cases X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b42ee2849f844793fdb0e3da6619de41fd0525e;p=thirdparty%2Ftor.git 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. --- diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index e904fe1c4b..e885033225 100644 --- 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 index 703d13a28e..c7eb26df00 100644 --- 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: