Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
d07f17f6
Commit
d07f17f6
authored
Sep 23, 2020
by
Nick Mathewson
👁
Browse files
IPv6 sybil: consider addresses in the same /64 to be equal.
parent
1be9e84b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/feature/dirauth/dirvote.c
View file @
d07f17f6
...
...
@@ -4219,7 +4219,8 @@ 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
;
return
tor_addr_compare
(
addr1
,
addr2
,
CMP_EXACT
);
const
int
maskbits
=
(
family
==
AF_INET
)
?
32
:
64
;
return
tor_addr_compare_masked
(
addr1
,
addr2
,
maskbits
,
CMP_EXACT
);
}
/** Helper for sorting: compares two ipv4 routerinfos first by ipv4 address,
...
...
David Goulet
🔆
@dgoulet
mentioned in commit
691c7171
·
Jan 15, 2021
mentioned in commit
691c7171
mentioned in commit 691c7171878371f98c4b0a32992f7d9ed9b1ac74
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment