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
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
sergi
Tor
Commits
9c242e95
Commit
9c242e95
authored
6 years ago
by
rl1987
Browse files
Options
Downloads
Patches
Plain Diff
Consider all routerinfo errors other than "not a server" transient
parent
77871505
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
src/feature/relay/router.c
+6
-16
6 additions, 16 deletions
src/feature/relay/router.c
src/test/test_policy.c
+1
-1
1 addition, 1 deletion
src/test/test_policy.c
with
7 additions
and
17 deletions
src/feature/relay/router.c
+
6
−
16
View file @
9c242e95
...
...
@@ -164,22 +164,12 @@ routerinfo_err_to_string(int err)
int
routerinfo_err_is_transient
(
int
err
)
{
switch
(
err
)
{
case
TOR_ROUTERINFO_ERROR_NO_EXT_ADDR
:
return
1
;
case
TOR_ROUTERINFO_ERROR_CANNOT_PARSE
:
return
1
;
case
TOR_ROUTERINFO_ERROR_NOT_A_SERVER
:
return
0
;
case
TOR_ROUTERINFO_ERROR_DIGEST_FAILED
:
return
0
;
// XXX: bug?
case
TOR_ROUTERINFO_ERROR_CANNOT_GENERATE
:
return
1
;
case
TOR_ROUTERINFO_ERROR_DESC_REBUILDING
:
return
1
;
}
return
0
;
/**
* For simplicity, we consider all errors other than
* "not a server" transient - see discussion on
* https://trac.torproject.org/projects/tor/ticket/27034
*/
return
err
!=
TOR_ROUTERINFO_ERROR_NOT_A_SERVER
;
}
/** Replace the current onion key with <b>k</b>. Does not affect
...
...
This diff is collapsed.
Click to expand it.
src/test/test_policy.c
+
1
−
1
View file @
9c242e95
...
...
@@ -1706,7 +1706,7 @@ test_policies_getinfo_helper_policies(void *arg)
rv
=
getinfo_helper_policies
(
NULL
,
"exit-policy/full"
,
&
answer
,
&
errmsg
);
tt_int_op
(
rv
,
OP_EQ
,
0
);
tt_int_op
(
rv
,
OP_EQ
,
-
1
);
tt_ptr_op
(
answer
,
OP_EQ
,
NULL
);
tt_ptr_op
(
errmsg
,
OP_NE
,
NULL
);
tt_str_op
(
errmsg
,
OP_EQ
,
"Key digest failed"
);
...
...
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