relay: Implement a circuit cell queue maximum size
commitd064122e706575c99e8d2162de93f7f08cc8d41e
authorDavid Goulet <dgoulet@torproject.org>
Tue, 20 Mar 2018 19:27:58 +0000 (20 15:27 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 16 Apr 2018 13:59:12 +0000 (16 09:59 -0400)
treea00dd4e9f23f079cd00e31218a1618af960d6de3
parent3d5bf12ac24bfbabad5f14c6cd45373b227d2816
relay: Implement a circuit cell queue maximum size

This commit introduces the consensus parameter "circ_max_cell_queue_size"
which controls the maximum number of cells a circuit queue should have.

The default value is currently 50000 cells which is above what should be
expected but keeps us a margin of error for padding cells.

Related to this is #9072. Back in 0.2.4.14-alpha, we've removed that limit due
to a Guard discovery attack. Ticket #25226 details why we are putting back the
limit due to the memory pressure issue on relays.

Fixes #25226

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/bug25226 [new file with mode: 0644]
src/or/networkstatus.c
src/or/relay.c
src/or/relay.h