diff options
author | teor <teor2345@gmail.com> | 2017-10-15 12:31:39 -0400 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-10-15 12:31:39 -0400 |
commit | 67eeee0c713caccf8e2b4114e7ea22c083ec0cb3 (patch) | |
tree | 73253b08636f509ddfdf187b84b5e39afc125c5c /src/or/dirvote.c | |
parent | 56dbba32079484d88016bd34de04122457dbdd89 (diff) | |
download | tor-67eeee0c713caccf8e2b4114e7ea22c083ec0cb3.tar.gz tor-67eeee0c713caccf8e2b4114e7ea22c083ec0cb3.zip |
Add a new consensus method that removes IPv6 address lines from microdescs
Implements #23828.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 12aa2363c5..0cbf8c48b4 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -3831,7 +3831,10 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method) smartlist_add_asprintf(chunks, "ntor-onion-key %s", kbuf); } + /* We originally put a lines in the micrdescriptors, but then we worked out + * that we needed them in the microdesc consensus. See #20916. */ if (consensus_method >= MIN_METHOD_FOR_A_LINES && + consensus_method < MIN_METHOD_FOR_NO_A_LINES_IN_MICRODESC && !tor_addr_is_null(&ri->ipv6_addr) && ri->ipv6_orport) smartlist_add_asprintf(chunks, "a %s\n", fmt_addrport(&ri->ipv6_addr, ri->ipv6_orport)); @@ -3940,7 +3943,9 @@ static const struct consensus_method_range_t { {MIN_METHOD_FOR_P6_LINES, MIN_METHOD_FOR_NTOR_KEY - 1}, {MIN_METHOD_FOR_NTOR_KEY, MIN_METHOD_FOR_ID_HASH_IN_MD - 1}, {MIN_METHOD_FOR_ID_HASH_IN_MD, MIN_METHOD_FOR_ED25519_ID_IN_MD - 1}, - {MIN_METHOD_FOR_ED25519_ID_IN_MD, MAX_SUPPORTED_CONSENSUS_METHOD}, + {MIN_METHOD_FOR_ED25519_ID_IN_MD, + MIN_METHOD_FOR_NO_A_LINES_IN_MICRODESC - 1}, + {MIN_METHOD_FOR_NO_A_LINES_IN_MICRODESC, MAX_SUPPORTED_CONSENSUS_METHOD}, {-1, -1} }; |