Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jarl
tor
Commits
bb9b4c37
Commit
bb9b4c37
authored
11 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Supply better and less frequent warnings on circID exhaustion
Fixes the surface behavior of #11553
parent
f3c20a28
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changes/bug11553
+5
-0
5 additions, 0 deletions
changes/bug11553
src/or/channel.h
+2
-0
2 additions, 0 deletions
src/or/channel.h
src/or/circuitbuild.c
+8
-1
8 additions, 1 deletion
src/or/circuitbuild.c
with
15 additions
and
1 deletion
changes/bug11553
0 → 100644
+
5
−
0
View file @
bb9b4c37
o Minor features:
- When we run out of usable circuit IDs on a channel, log only one
warning for the whole channel, and include a description of
how many circuits there were on the channel. Fix for part of ticket
#11553.
This diff is collapsed.
Click to expand it.
src/or/channel.h
+
2
−
0
View file @
bb9b4c37
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
src/or/circuitbuild.c
+
8
−
1
View file @
bb9b4c37
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment