Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
04ea5501
Commit
04ea5501
authored
Oct 24, 2012
by
Nick Mathewson
🎨
Browse files
Authorities put p6 lines into microdescriptors.
parent
c53adac1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/or/dirvote.c
View file @
04ea5501
...
...
@@ -3569,6 +3569,17 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
if
(
summary
&&
strcmp
(
summary
,
"reject 1-65535"
))
smartlist_add_asprintf
(
chunks
,
"p %s
\n
"
,
summary
);
if
(
consensus_method
>=
MIN_METHOD_FOR_P6_LINES
&&
ri
->
ipv6_exit_policy
)
{
/* XXXX024 This doesn't match proposal 208, which says these should
* be taken unchanged from the routerinfo. That's bogosity, IMO:
* the proposal should have said to do this instead.*/
char
*
p6
=
write_short_policy
(
ri
->
ipv6_exit_policy
);
if
(
p6
&&
strcmp
(
p6
,
"reject 1-65535"
))
smartlist_add_asprintf
(
chunks
,
"p6 %s
\n
"
,
p6
);
tor_free
(
p6
);
}
output
=
smartlist_join_strings
(
chunks
,
""
,
0
,
NULL
);
{
...
...
src/or/dirvote.h
View file @
04ea5501
...
...
@@ -20,7 +20,7 @@
#define MIN_VOTE_INTERVAL 300
/** The highest consensus method that we currently support. */
#define MAX_SUPPORTED_CONSENSUS_METHOD 1
4
#define MAX_SUPPORTED_CONSENSUS_METHOD 1
5
/** Lowest consensus method that contains a 'directory-footer' marker */
#define MIN_METHOD_FOR_FOOTER 9
...
...
@@ -45,6 +45,9 @@
/** Lowest consensus method that contains "a" lines. */
#define MIN_METHOD_FOR_A_LINES 14
/** Lowest consensus method where microdescs may include a "p6" line. */
#define MIN_METHOD_FOR_P6_LINES 15
void
dirvote_free_all
(
void
);
/* vote manipulation */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment