Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
George Kadianakis
Tor
Commits
5949a70b
Commit
5949a70b
authored
Jul 12, 2021
by
George Kadianakis
Browse files
Add stricter limits to the number of L2 nodes
parent
7f701794
Pipeline
#9225
passed with stage
in 9 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/feature/client/entrynodes.c
View file @
5949a70b
...
...
@@ -3990,6 +3990,10 @@ static routerset_t *layer2_routerset = NULL;
/** Number of L2 guards */
#define NUMBER_SECOND_GUARDS 4
/** Make sure that the number of L2 guards is less than the number of
* MAX_SANE_RESTRICTED_NODES */
CTASSERT
(
NUMBER_SECOND_GUARDS
<
20
);
/** Lifetime of L2 guards:
* 1 to 12 days, for an average of a week using the max(x,x) distribution */
#define MIN_SECOND_GUARD_LIFETIME (3600*24)
...
...
@@ -4002,7 +4006,7 @@ get_number_of_layer2_hs_guards(void)
return
(
int
)
networkstatus_get_param
(
NULL
,
"guard-hs-l2-number"
,
NUMBER_SECOND_GUARDS
,
1
,
INT32_MAX
);
1
,
19
);
}
/** Return the minimum lifetime of L2 guards */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment