summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-17 09:16:53 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-17 09:16:53 -0400
commit4d7ce27105dfb7f04ef14a59d098d2f81363298c (patch)
tree4608dc4b6a0293f095b3f61b80e8d22d971b8e69 /src/core
parentb5f39955d1ad14295a9ef415d13a8c6bfd25f8b9 (diff)
parent6ee19e57c2a25060f6610e795731575aa776d903 (diff)
downloadtor-4d7ce27105dfb7f04ef14a59d098d2f81363298c.tar.gz
tor-4d7ce27105dfb7f04ef14a59d098d2f81363298c.zip
Merge branch 'bug31107_041' into bug31107_master
Diffstat (limited to 'src/core')
-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 2a6edc951c..25f3baf924 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;