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
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
David Goulet
Tor
Commits
a7fe37f1
Commit
a7fe37f1
authored
3 years ago
by
David Goulet
Browse files
Options
Downloads
Patches
Plain Diff
protover: Fix merge forward from 035
Signed-off-by:
David Goulet
<
dgoulet@torproject.org
>
parent
47adba87
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/or/protover.c
+7
-15
7 additions, 15 deletions
src/core/or/protover.c
src/feature/dirauth/dirvote.h
+0
-58
0 additions, 58 deletions
src/feature/dirauth/dirvote.h
src/test/test_protover.c
+4
-4
4 additions, 4 deletions
src/test/test_protover.c
with
11 additions
and
77 deletions
src/core/or/protover.c
+
7
−
15
View file @
a7fe37f1
...
...
@@ -478,20 +478,13 @@ protover_get_supported_protocols(void)
* XXX: WARNING!
*/
/*
* NOTE: A keen observer will notice that "LinkAuth" is not recommended nor
* required. This is due to the HAVE_WORKING_TOR_TLS_GET_TLSSECRETS define
* that can either set "1" or "1,3" and so we can't enforce one or the other
* due to this uncertainty on how tor was built.
*/
/** Return the recommended client protocols list that directory authorities
* put in the consensus. */
const
char
*
protover_get_recommended_client_protocols
(
void
)
{
return
"Cons=
1-
2 Desc=
1-
2 DirCache=
1
HSDir=
1
HSIntro=
3
HSRend=
1
"
"Link=4 Microdesc=
1-
2 Relay=2"
;
return
"Cons=2 Desc=2 DirCache=
2
HSDir=
2
HSIntro=
4
HSRend=
2
"
"Link=4
-5
Microdesc=2 Relay=2"
;
}
/** Return the recommended relay protocols list that directory authorities
...
...
@@ -499,8 +492,8 @@ protover_get_recommended_client_protocols(void)
const
char
*
protover_get_recommended_relay_protocols
(
void
)
{
return
"Cons=
1-
2 Desc=
1-
2 DirCache=
1
HSDir=
1
HSIntro=
3
HSRend=
1
"
"Link=4 Microdesc=
1-
2 Relay=2"
;
return
"Cons=2 Desc=2 DirCache=
2
HSDir=
2
HSIntro=
4
HSRend=
2
"
"Link=4
-5 LinkAuth=3
Microdesc=2 Relay=2"
;
}
/** Return the required client protocols list that directory authorities
...
...
@@ -508,8 +501,7 @@ protover_get_recommended_relay_protocols(void)
const
char
*
protover_get_required_client_protocols
(
void
)
{
return
"Cons=1-2 Desc=1-2 DirCache=1 HSDir=1 HSIntro=3 HSRend=1 "
"Link=4 Microdesc=1-2 Relay=2"
;
return
"Cons=2 Desc=2 Link=4 Microdesc=2 Relay=2"
;
}
/** Return the required relay protocols list that directory authorities
...
...
@@ -517,8 +509,8 @@ protover_get_required_client_protocols(void)
const
char
*
protover_get_required_relay_protocols
(
void
)
{
return
"Cons=
1
Desc=
1
DirCache=
1
HSDir=
1
HSIntro=
3
HSRend=
1
"
"Link=
3-4
Microdesc=
1
Relay=
1-
2"
;
return
"Cons=
2
Desc=
2
DirCache=
2
HSDir=
2
HSIntro=
4
HSRend=
2
"
"Link=
4-5 LinkAuth=3
Microdesc=
2
Relay=2"
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
src/feature/dirauth/dirvote.h
+
0
−
58
View file @
a7fe37f1
...
...
@@ -260,64 +260,6 @@ char *networkstatus_get_detached_signatures(smartlist_t *consensuses);
STATIC
microdesc_t
*
dirvote_create_microdescriptor
(
const
routerinfo_t
*
ri
,
int
consensus_method
);
/** The recommended relay protocols for this authority's votes.
* Recommending a new protocol causes old tor versions to log a warning.
*/
#define DIRVOTE_RECOMMEND_RELAY_PROTO \
"Cons=2 " \
"Desc=2 " \
"DirCache=2 " \
"HSDir=2 " \
"HSIntro=4 " \
"HSRend=2 " \
"Link=4-5 " \
"LinkAuth=3 " \
"Microdesc=2 " \
"Relay=2"
/** The recommended client protocols for this authority's votes.
* Recommending a new protocol causes old tor versions to log a warning.
*/
#define DIRVOTE_RECOMMEND_CLIENT_PROTO \
"Cons=2 " \
"Desc=2 " \
"DirCache=2 " \
"HSDir=2 " \
"HSIntro=4 " \
"HSRend=2 " \
"Link=4-5 " \
"Microdesc=2 " \
"Relay=2"
/** The required relay protocols for this authority's votes.
* WARNING: Requiring a new protocol causes old tor versions to shut down.
* Requiring the wrong protocols can break the tor network.
* See Proposal 303: When and how to remove support for protocol versions.
*/
#define DIRVOTE_REQUIRE_RELAY_PROTO \
"Cons=2 " \
"Desc=2 " \
"DirCache=2 " \
"HSDir=2 " \
"HSIntro=4 " \
"HSRend=2 " \
"Link=4-5 " \
"LinkAuth=3 " \
"Microdesc=2 " \
"Relay=2"
/** The required relay protocols for this authority's votes.
* WARNING: Requiring a new protocol causes old tor versions to shut down.
* Requiring the wrong protocols can break the tor network.
* See Proposal 303: When and how to remove support for protocol versions.
*/
#define DIRVOTE_REQUIRE_CLIENT_PROTO \
"Cons=2 " \
"Desc=2 " \
"Link=4 " \
"Microdesc=2 " \
"Relay=2"
#endif
/* defined(DIRVOTE_PRIVATE) */
#endif
/* !defined(TOR_DIRVOTE_H) */
This diff is collapsed.
Click to expand it.
src/test/test_protover.c
+
4
−
4
View file @
a7fe37f1
...
...
@@ -606,10 +606,10 @@ test_protover_vote_roundtrip_ours(void *args)
(
void
)
args
;
const
char
*
examples
[]
=
{
protover_get_supported_protocols
(),
DIRVOTE_RECOMMEND_RELAY_PROTO
,
DIRVOTE_RECOMMEND_CLIENT_PROTO
,
DIRVOTE_REQUIRE_RELAY_PROTO
,
DIRVOTE_REQUIRE_CLIENT_PROTO
,
protover_get_recommended_client_protocols
()
,
protover_get_recommended_relay_protocols
()
,
protover_get_required_client_protocols
()
,
protover_get_required_relay_protocols
()
,
};
unsigned
u
;
smartlist_t
*
votes
=
smartlist_new
();
...
...
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