diff options
author | teor <teor2345@gmail.com> | 2017-10-15 12:10:51 -0400 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-10-15 12:31:06 -0400 |
commit | 56dbba32079484d88016bd34de04122457dbdd89 (patch) | |
tree | 623e4031a59fd943c95379bceb065322adadcdab /src/or/dirserv.c | |
parent | b8d4588c90d399b4b4487dfbacfdbe6dd415aac4 (diff) | |
download | tor-56dbba32079484d88016bd34de04122457dbdd89.tar.gz tor-56dbba32079484d88016bd34de04122457dbdd89.zip |
Add a consensus method for IPv6 address lines in the microdesc consensus
Implements #23826.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 42ffdfa0d5..ad6448a3dd 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1949,8 +1949,10 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version, * networkstatus_type_t values, with an additional control port value * added -MP */ - /* V3 microdesc consensuses don't have "a" lines. */ - if (format == NS_V3_CONSENSUS_MICRODESC) + /* V3 microdesc consensuses only have "a" lines in later consensus methods + */ + if (format == NS_V3_CONSENSUS_MICRODESC && + consensus_method < MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS) goto done; /* Possible "a" line. At most one for now. */ @@ -1959,7 +1961,7 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version, fmt_addrport(&rs->ipv6_addr, rs->ipv6_orport)); } - if (format == NS_V3_CONSENSUS) + if (format == NS_V3_CONSENSUS || format == NS_V3_CONSENSUS_MICRODESC) goto done; smartlist_add_asprintf(chunks, |