diff options
author | Andrea Shepard <andrea@torproject.org> | 2013-06-15 02:27:23 -0700 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2013-06-15 02:27:23 -0700 |
commit | 469bd7a3cfbe6c5ca5c2602a10ee1854714e93c5 (patch) | |
tree | 1fad60ddcb16a4bb583bf7a922a124e87309796a /src/or/relay.c | |
parent | 7f67becf307e383eeda94dc4a7dbf5629436ef8c (diff) | |
parent | 9e45d940d466bcefcd1490fc2ae0e5a6298a846f (diff) | |
download | tor-469bd7a3cfbe6c5ca5c2602a10ee1854714e93c5.tar.gz tor-469bd7a3cfbe6c5ca5c2602a10ee1854714e93c5.zip |
Merge branch 'bug9072-024' into bug9072-025
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 58ca4e957c..38776bcd9a 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -58,7 +58,9 @@ static void adjust_exit_policy_from_exitpolicy_failure(origin_circuit_t *circ, entry_connection_t *conn, node_t *node, const tor_addr_t *addr); +#if 0 static int get_max_middle_cells(void); +#endif /** Stop reading on edge connections when we have this many cells * waiting on the appropriate queue. */ @@ -2473,6 +2475,7 @@ channel_flush_from_first_active_circuit(channel_t *chan, int max) return n_flushed; } +#if 0 /** Indicate the current preferred cap for middle circuits; zero disables * the cap. Right now it's just a constant, ORCIRC_MAX_MIDDLE_CELLS, but * the logic in append_cell_to_circuit_queue() is written to be correct @@ -2484,6 +2487,7 @@ get_max_middle_cells(void) { return ORCIRC_MAX_MIDDLE_CELLS; } +#endif /** Add <b>cell</b> to the queue of <b>circ</b> writing to <b>chan</b> * transmitting in <b>direction</b>. */ @@ -2495,7 +2499,9 @@ append_cell_to_circuit_queue(circuit_t *circ, channel_t *chan, or_circuit_t *orcirc = NULL; cell_queue_t *queue; int streams_blocked; +#if 0 uint32_t tgt_max_middle_cells, p_len, n_len, tmp, hard_max_middle_cells; +#endif if (circ->marked_for_close) return; @@ -2509,6 +2515,10 @@ append_cell_to_circuit_queue(circuit_t *circ, channel_t *chan, 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_chan != NULL) && CIRCUIT_IS_ORCIRC(circ)) { orcirc = TO_OR_CIRCUIT(circ); @@ -2585,6 +2595,7 @@ append_cell_to_circuit_queue(circuit_t *circ, channel_t *chan, } } } +#endif cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids, 1); |