]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Restore a pair of erroneously removed cases
authorNick Mathewson <nickm@torproject.org>
Fri, 25 Apr 2025 14:24:50 +0000 (10:24 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 25 Apr 2025 14:24:55 +0000 (10:24 -0400)
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.

src/core/or/channeltls.c
src/core/or/connection_or.c

index e904fe1c4ba73537534408a2547f08c69ce876ab..e8850332250aec480ff58f395e6e25fa09732096 100644 (file)
@@ -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");
index 703d13a28eb517429b12b429dd2d4aa5e1a3fb7b..c7eb26df00d5dab10b2be66fb04d90320fb26b1d 100644 (file)
@@ -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: