]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'bug9072-023' into bug9072-024
authorAndrea Shepard <andrea@torproject.org>
Sat, 15 Jun 2013 09:20:19 +0000 (02:20 -0700)
committerAndrea Shepard <andrea@torproject.org>
Sat, 15 Jun 2013 09:20:19 +0000 (02:20 -0700)
1  2 
src/or/relay.c

diff --cc src/or/relay.c
index a26d4186d0479d7d12721773729ca3c66728e7be,fdb4bff709ff32436e97dfd891a7d75d8ed4c852..0f21663bcd088bc6660e163c6edf6ccf08a3b209
@@@ -2474,18 -2540,22 +2474,22 @@@ append_cell_to_circuit_queue(circuit_t 
      return;
  
    if (direction == CELL_DIRECTION_OUT) {
 -    queue = &circ->n_conn_cells;
 -    streams_blocked = circ->streams_blocked_on_n_conn;
 +    queue = &circ->n_chan_cells;
 +    streams_blocked = circ->streams_blocked_on_n_chan;
    } else {
      orcirc = TO_OR_CIRCUIT(circ);
 -    queue = &orcirc->p_conn_cells;
 -    streams_blocked = circ->streams_blocked_on_p_conn;
 +    queue = &orcirc->p_chan_cells;
 +    streams_blocked = circ->streams_blocked_on_p_chan;
    }
  
+   /*
+    * Disabling this for now because of a possible guard discovery attack
+    */
+ #if 0
    /* Are we a middle circuit about to exceed ORCIRC_MAX_MIDDLE_CELLS? */
 -  if ((circ->n_conn != NULL) && CIRCUIT_IS_ORCIRC(circ)) {
 +  if ((circ->n_chan != NULL) && CIRCUIT_IS_ORCIRC(circ)) {
      orcirc = TO_OR_CIRCUIT(circ);
 -    if (orcirc->p_conn) {
 +    if (orcirc->p_chan) {
        if (queue->n + 1 >= ORCIRC_MAX_MIDDLE_CELLS) {
          /* Queueing this cell would put queue over the cap */
          log_warn(LD_CIRC,
        }
      }
    }
+ #endif
  
 -  cell_queue_append_packed_copy(queue, cell);
 +  cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids);
  
    /* If we have too many cells on the circuit, we should stop reading from
     * the edge streams for a while. */