aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirvote.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-15 12:54:07 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-15 12:57:57 -0500
commit691c7171878371f98c4b0a32992f7d9ed9b1ac74 (patch)
tree750e9b754225c1d06898db0c7ec1992d3a8c3117 /src/feature/dirauth/dirvote.c
parente5a0c739d4865b300e904d45c413d5c8f0da304c (diff)
downloadtor-691c7171878371f98c4b0a32992f7d9ed9b1ac74.tar.gz
tor-691c7171878371f98c4b0a32992f7d9ed9b1ac74.zip
Revert "IPv6 sybil: consider addresses in the same /64 to be equal."
This reverts commit d07f17f67685d75fec8a851b3ae3d157c1e31aa3. We don't want to consider an entire routable IPv6 network as sybil if more than 2 relays happen to be on it. For path selection it is very important but not for selecting relays in the consensus. Fixes #40243
Diffstat (limited to 'src/feature/dirauth/dirvote.c')
-rw-r--r--src/feature/dirauth/dirvote.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index a1f9bb28ae..6824af815f 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -4219,8 +4219,7 @@ compare_routerinfo_addrs_by_family(const routerinfo_t *a,
{
const tor_addr_t *addr1 = (family==AF_INET) ? &a->ipv4_addr : &a->ipv6_addr;
const tor_addr_t *addr2 = (family==AF_INET) ? &b->ipv4_addr : &b->ipv6_addr;
- const int maskbits = (family==AF_INET) ? 32 : 64;
- return tor_addr_compare_masked(addr1, addr2, maskbits, CMP_EXACT);
+ return tor_addr_compare(addr1, addr2, CMP_EXACT);
}
/** Helper for sorting: compares two ipv4 routerinfos first by ipv4 address,