Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Benjamin J. Thompson
Tor
Commits
44defa4b
Commit
44defa4b
authored
20 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Never list unapproved servers as recommended
svn:r1790
parent
924f6028
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
+16
-4
16 additions, 4 deletions
src/or/dirserv.c
with
16 additions
and
4 deletions
src/or/dirserv.c
+
16
−
4
View file @
44defa4b
...
...
@@ -166,6 +166,20 @@ dirserv_router_fingerprint_is_known(const routerinfo_t *router)
}
}
/* Return true iff any router named 'nickname' is in the fingerprint
* list. */
static
int
router_nickname_is_approved
(
const
char
*
nickname
)
{
int
i
;
for
(
i
=
0
;
i
<
n_fingerprints
;
++
i
)
{
if
(
!
strcasecmp
(
nickname
,
fingerprint_list
[
i
].
nickname
))
{
return
1
;
}
}
return
0
;
}
/* Clear the current fingerprint list. */
void
dirserv_free_fingerprint_list
()
...
...
@@ -406,10 +420,8 @@ list_running_servers(char **nicknames_out)
continue
;
/* only list successfully handshaked OR's. */
if
(
!
conn
->
nickname
)
/* it's an OP, don't list it */
continue
;
/* XXX if conn->nickname not approved, continue. otherwise when you
* remove them from the approved list and hup, their descriptor is
* taken out of the directory, but they're still in the running-routers
* line. */
if
(
!
router_nickname_is_approved
(
conn
->
nickname
))
continue
;
/* If we removed them from the approved list, don't list it.*/
nickname_lst
[
n
++
]
=
conn
->
nickname
;
}
length
=
n
+
1
;
/* spaces + EOS + 1. */
...
...
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