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
6785f0b6
Commit
6785f0b6
authored
9 years ago
by
David Goulet
Committed by
Nick Mathewson
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
HSDir flag now requires the Stable flag
Fixes #8243
parent
f2ff8145
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket8243
+7
-0
7 additions, 0 deletions
changes/ticket8243
src/or/dirserv.c
+4
-2
4 additions, 2 deletions
src/or/dirserv.c
with
11 additions
and
2 deletions
changes/ticket8243
0 → 100644
+
7
−
0
View file @
6785f0b6
o Minor feature:
- The HSDir flag given by authorities now requires the Stable flag. For
the current network, this results in going from 2887 to 2806 HSDirs.
Also, it makes it harder for an attacker to launch a sybil attack by
raising the effort for a relay to become Stable which takes at the
very least 7 days to do so and by keeping the 96 hours uptime
requirement for HSDir. Implements ticket #8243.
This diff is collapsed.
Click to expand it.
src/or/dirserv.c
+
4
−
2
View file @
6785f0b6
...
...
@@ -1278,8 +1278,9 @@ dirserv_thinks_router_is_unreliable(time_t now,
}
/** Return true iff <b>router</b> should be assigned the "HSDir" flag.
* Right now this means it advertises support for it, it has a high
* uptime, it has a DirPort open, and it's currently considered Running.
* Right now this means it advertises support for it, it has a high uptime,
* it has a DirPort open, it has the Stable flag and it's currently
* considered Running.
*
* This function needs to be called after router-\>is_running has
* been set.
...
...
@@ -1306,6 +1307,7 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
uptime
=
real_uptime
(
router
,
now
);
return
(
router
->
wants_to_be_hs_dir
&&
router
->
dir_port
&&
node
->
is_stable
&&
uptime
>=
get_options
()
->
MinUptimeHidServDirectoryV2
&&
router_is_active
(
router
,
node
,
now
));
}
...
...
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