Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
debian
tor
Commits
cb28fe48
Commit
cb28fe48
authored
11 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'public/bug10722'
parents
dd3f2f63
bb21d142
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/bug10722
+8
-0
8 additions, 0 deletions
changes/bug10722
src/or/rendclient.c
+23
-4
23 additions, 4 deletions
src/or/rendclient.c
with
31 additions
and
4 deletions
changes/bug10722
0 → 100644
+
8
−
0
View file @
cb28fe48
o Minor bugfixes:
- Consider non-excluded hidden service directory servers before
excluded ones. Do not consider excluded hidden service directory
servers at all if StrictNodes was set. (Previously, we would
sometimes decide to connect to those servers, and then realize
before we initiated a connection that we had excluded them.)
Fix for bug #10722. Bugfix on 0.2.0.10-alpha. Reported by
"mr-4".
This diff is collapsed.
Click to expand it.
src/or/rendclient.c
+
23
−
4
View file @
cb28fe48
...
...
@@ -619,11 +619,14 @@ static int
directory_get_from_hs_dir
(
const
char
*
desc_id
,
const
rend_data_t
*
rend_query
)
{
smartlist_t
*
responsible_dirs
=
smartlist_new
();
smartlist_t
*
usable_responsible_dirs
=
smartlist_new
();
const
or_options_t
*
options
=
get_options
();
routerstatus_t
*
hs_dir
;
char
desc_id_base32
[
REND_DESC_ID_V2_LEN_BASE32
+
1
];
time_t
now
=
time
(
NULL
);
char
descriptor_cookie_base64
[
3
*
REND_DESC_COOKIE_LEN_BASE64
];
int
tor2web_mode
=
get_options
()
->
Tor2webMode
;
const
int
tor2web_mode
=
options
->
Tor2webMode
;
int
excluded_some
;
tor_assert
(
desc_id
);
tor_assert
(
rend_query
);
/* Determine responsible dirs. Even if we can't get all we want,
...
...
@@ -644,16 +647,32 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
dir
,
desc_id_base32
,
rend_query
,
0
,
0
);
const
node_t
*
node
=
node_get_by_id
(
dir
->
identity_digest
);
if
(
last
+
REND_HID_SERV_DIR_REQUERY_PERIOD
>=
now
||
!
node
||
!
node_has_descriptor
(
node
))
SMARTLIST_DEL_CURRENT
(
responsible_dirs
,
dir
);
!
node
||
!
node_has_descriptor
(
node
))
{
SMARTLIST_DEL_CURRENT
(
responsible_dirs
,
dir
);
continue
;
}
if
(
!
routerset_contains_node
(
options
->
ExcludeNodes
,
node
))
{
smartlist_add
(
usable_responsible_dirs
,
dir
);
}
});
hs_dir
=
smartlist_choose
(
responsible_dirs
);
excluded_some
=
smartlist_len
(
usable_responsible_dirs
)
<
smartlist_len
(
responsible_dirs
);
hs_dir
=
smartlist_choose
(
usable_responsible_dirs
);
if
(
!
hs_dir
&&
!
options
->
StrictNodes
)
hs_dir
=
smartlist_choose
(
responsible_dirs
);
smartlist_free
(
responsible_dirs
);
smartlist_free
(
usable_responsible_dirs
);
if
(
!
hs_dir
)
{
log_info
(
LD_REND
,
"Could not pick one of the responsible hidden "
"service directories, because we requested them all "
"recently without success."
);
if
(
options
->
StrictNodes
&&
excluded_some
)
{
log_info
(
LD_REND
,
"There are others that we could have tried, but "
"they are all excluded, and StrictNodes is set."
);
}
return
0
;
}
...
...
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