Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
The Tor Project
Core
Tor
Commits
d517233e
Commit
d517233e
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'linus/bug6621'
parents
661bd3fe
b1c4b3ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/or/dirserv.c
+17
-4
17 additions, 4 deletions
src/or/dirserv.c
with
17 additions
and
4 deletions
src/or/dirserv.c
+
17
−
4
View file @
d517233e
...
...
@@ -980,6 +980,7 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
unreachable.
*/
int
answer
;
const
or_options_t
*
options
=
get_options
();
node_t
*
node
=
node_get_mutable_by_id
(
router
->
cache_info
.
identity_digest
);
tor_assert
(
node
);
...
...
@@ -992,13 +993,23 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
/* A hibernating router is down unless we (somehow) had contact with it
* since it declared itself to be hibernating. */
answer
=
0
;
}
else
if
(
get_
options
()
->
AssumeReachable
)
{
}
else
if
(
options
->
AssumeReachable
)
{
/* If AssumeReachable, everybody is up unless they say they are down! */
answer
=
1
;
}
else
{
/* Otherwise, a router counts as up if we found it reachable in the last
REACHABLE_TIMEOUT seconds. */
answer
=
(
now
<
node
->
last_reachable
+
REACHABLE_TIMEOUT
);
/* Otherwise, a router counts as up if we found all announced OR
ports reachable in the last REACHABLE_TIMEOUT seconds.
XXX prop186 For now there's always one IPv4 and at most one
IPv6 OR port.
If we're not on IPv6, don't consider reachability of potential
IPv6 OR port since that'd kill all dual stack relays until a
majority of the dir auths have IPv6 connectivity. */
answer
=
(
now
<
node
->
last_reachable
+
REACHABLE_TIMEOUT
&&
(
options
->
AuthDirHasIPv6Connectivity
==
0
||
tor_addr_is_null
(
&
router
->
ipv6_addr
)
||
now
<
node
->
last_reachable6
+
REACHABLE_TIMEOUT
));
}
if
(
!
answer
&&
running_long_enough_to_decide_unreachable
())
{
...
...
@@ -1008,6 +1019,8 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
REACHABILITY_TEST_CYCLE_PERIOD seconds, then the router has probably
been down since at least that time after we last successfully reached
it.
XXX ipv6
*/
time_t
when
=
now
;
if
(
node
->
last_reachable
&&
...
...
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