aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-07 23:11:32 -0400
committerNick Mathewson <nickm@torproject.org>2014-05-07 23:11:32 -0400
commit411c622906c0b6b071874634781684c65485898a (patch)
treec914df42bcbce638b786affcd915bf11112592dc /src
parent0ad8133a7e4f70120986f02bddb3abb6cc3d9509 (diff)
parentbb9b4c37f8e7f5cf78918f382e90d8b11ff42551 (diff)
downloadtor-411c622906c0b6b071874634781684c65485898a.tar
tor-411c622906c0b6b071874634781684c65485898a.tar.gz
Merge commit 'bb9b4c37f8e7f5cf78918f382e90d8b11ff42551' into maint-0.2.4
Diffstat (limited to 'src')
-rw-r--r--src/or/channel.h2
-rw-r--r--src/or/circuitbuild.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 2dca81705..29ba40e32 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -148,6 +148,8 @@ struct channel_s {
ENUM_BF(circ_id_type_t) circ_id_type:2;
/** DOCDOC*/
unsigned wide_circ_ids:1;
+ /** Have we logged a warning about circID exhaustion on this channel? */
+ unsigned warned_circ_ids_exhausted:1;
/*
* Which circ_id do we try to use next on this connection? This is
* always in the range 0..1<<15-1.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index e47a2780a..2b4d3c311 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;