aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-09 12:41:56 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-16 16:41:53 -0500
commit441a048a3a135a9405f4fb8463fb60a0f11e42d2 (patch)
tree3b1074cef54f97ef8303535d574110349aa10969 /src/feature/nodelist
parente45810113b150533611c7d9cb5f0f264e00a7394 (diff)
downloadtor-441a048a3a135a9405f4fb8463fb60a0f11e42d2.tar.gz
tor-441a048a3a135a9405f4fb8463fb60a0f11e42d2.zip
Remove support for now-obsolete consensus methods before 28.
Closes ticket 32695.
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/fmt_routerstatus.c8
-rw-r--r--src/feature/nodelist/networkstatus.c10
2 files changed, 5 insertions, 13 deletions
diff --git a/src/feature/nodelist/fmt_routerstatus.c b/src/feature/nodelist/fmt_routerstatus.c
index 8dde0088de..e9b00939e6 100644
--- a/src/feature/nodelist/fmt_routerstatus.c
+++ b/src/feature/nodelist/fmt_routerstatus.c
@@ -50,6 +50,8 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
int consensus_method,
const vote_routerstatus_t *vrs)
{
+ (void) consensus_method;
+
char *summary;
char *result = NULL;
@@ -78,12 +80,6 @@ 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 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. */
if (!tor_addr_is_null(&rs->ipv6_addr)) {
smartlist_add_asprintf(chunks, "a %s\n",
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index 7868020477..f88b5e6d65 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -1585,6 +1585,7 @@ networkstatus_consensus_is_already_downloading(const char *resource)
int
networkstatus_consensus_has_ipv6(const or_options_t* options)
{
+ (void) options;
const networkstatus_t *cons = networkstatus_get_reasonably_live_consensus(
approx_time(),
usable_consensus_flavor());
@@ -1594,13 +1595,8 @@ networkstatus_consensus_has_ipv6(const or_options_t* options)
return 0;
}
- /* Different flavours of consensus gained IPv6 at different times */
- if (we_use_microdescriptors_for_circuits(options)) {
- return
- cons->consensus_method >= MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS;
- } else {
- return 1;
- }
+ /* All supported consensus methods have IPv6 addresses. */
+ return 1;
}
/** Given two router status entries for the same router identity, return 1 if