aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-01-19 13:20:31 -0500
committerNick Mathewson <nickm@torproject.org>2021-01-19 13:20:31 -0500
commit27ee12836d67a0cfa123a2f2fad378c93848519a (patch)
tree5541273dc90aa6afc4db386a25d8eae5f0c1f4ff
parente3a5482681f9c4625df1e418b42038cded3cb082 (diff)
parent691c7171878371f98c4b0a32992f7d9ed9b1ac74 (diff)
downloadtor-27ee12836d67a0cfa123a2f2fad378c93848519a.tar.gz
tor-27ee12836d67a0cfa123a2f2fad378c93848519a.zip
Merge remote-tracking branch 'tor-gitlab/mr/261' into maint-0.4.5
-rw-r--r--changes/ticket402434
-rw-r--r--src/feature/dirauth/dirvote.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/changes/ticket40243 b/changes/ticket40243
new file mode 100644
index 0000000000..548ec95ab4
--- /dev/null
+++ b/changes/ticket40243
@@ -0,0 +1,4 @@
+ o Major bugfixes (authority, IPv6):
+ - Do not consider multiple relays in the same IPv6 network to be sybils.
+ Sybils are selected based on the /128 now, not the /64. Fixes bug 40243;
+ bugfix on 0.4.5.1-alpha.
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,