Commit 4d7ce271 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Merge branch 'bug31107_041' into bug31107_master

parents b5f39955 6ee19e57
Loading
Loading
Loading
Loading

changes/bug31107

0 → 100644
+4 −0
Original line number Original line Diff line number Diff line
  o Minor bugfixes (logging, protocol violations):
    - Do not log a nonfatal assertion failure when receiving a VERSIONS
      cell on a connection using the obsolete v1 link protocol. Log a
      protocol_warn instead. Fixes bug 31107; bugfix on 0.2.4.4-alpha.
+9 −1
Original line number Original line Diff line number Diff line
@@ -1106,7 +1106,15 @@ channel_tls_handle_cell(cell_t *cell, or_connection_t *conn)
      /* do nothing */
      /* do nothing */
      break;
      break;
    case CELL_VERSIONS:
    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;
      break;
    case CELL_NETINFO:
    case CELL_NETINFO:
      ++stats_n_netinfo_cells_processed;
      ++stats_n_netinfo_cells_processed;