aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/channeltls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-17 09:16:52 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-17 09:16:52 -0400
commitda8ba5010b59ac3d55563df420711f862faeb2f8 (patch)
treedbf795c1c914997cbcf2bebc7a326bf18222272a /src/core/or/channeltls.c
parent896a1ac50b6ab182c1e15cc5271d0b24fcb90a31 (diff)
parent7589995111b452cf7e92f5e9b5d94df244cbdbb9 (diff)
downloadtor-da8ba5010b59ac3d55563df420711f862faeb2f8.tar.gz
tor-da8ba5010b59ac3d55563df420711f862faeb2f8.zip
Merge branch 'bug31107_035' into bug31107_040
Diffstat (limited to 'src/core/or/channeltls.c')
-rw-r--r--src/core/or/channeltls.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c
index 5a00a9e00f..d508c91988 100644
--- a/src/core/or/channeltls.c
+++ b/src/core/or/channeltls.c
@@ -1106,7 +1106,15 @@ channel_tls_handle_cell(cell_t *cell, or_connection_t *conn)
/* do nothing */
break;
case CELL_VERSIONS:
- tor_fragile_assert();
+ /* A VERSIONS cell should always be a variable-length cell, and
+ * so should never reach this function (which handles constant-sized
+ * cells). But if the connection is using the (obsolete) v1 link
+ * protocol, all cells will be treated as constant-sized, and so
+ * it's possible we'll reach this code.
+ */
+ log_fn(LOG_PROTOCOL_WARN, LD_CHANNEL,
+ "Received unexpected VERSIONS cell on a channel using link "
+ "protocol %d; ignoring.", conn->link_proto);
break;
case CELL_NETINFO:
++stats_n_netinfo_cells_processed;