diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-18 12:28:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-18 12:31:06 -0400 |
commit | bb9b4c37f8e7f5cf78918f382e90d8b11ff42551 (patch) | |
tree | a54f4514708bad9d4364a2773b6c829dbd3b7972 /src/or/circuitbuild.c | |
parent | f3c20a28ab50386064043cc31edb3b1b543d6fc6 (diff) | |
download | tor-bb9b4c37f8e7f5cf78918f382e90d8b11ff42551.tar.gz tor-bb9b4c37f8e7f5cf78918f382e90d8b11ff42551.zip |
Supply better and less frequent warnings on circID exhaustion
Fixes the surface behavior of #11553
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index e47a2780af..2b4d3c3118 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -127,7 +127,14 @@ get_unique_circ_id_by_chan(channel_t *chan) /* Make sure we don't loop forever if all circ_id's are used. This * matters because it's an external DoS opportunity. */ - log_warn(LD_CIRC,"No unused circ IDs. Failing."); + if (! chan->warned_circ_ids_exhausted) { + chan->warned_circ_ids_exhausted = 1; + log_warn(LD_CIRC,"No unused circIDs found on channel %s wide " + "circID support, with %u inbound and %u outbound circuits. " + "Failing a circuit.", + chan->wide_circ_ids ? "with" : "without", + chan->num_p_circuits, chan->num_n_circuits); + } return 0; } test_circ_id |= high_bit; |