mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Avoid reordering IPv6 interface addresses
When deleting unsuitable addresses in get_interface_address6_list(), to avoid reordering IPv6 interface addresses and keep the order returned by the OS, use SMARTLIST_DEL_CURRENT_KEEPORDER() instead of SMARTLIST_DEL_CURRENT(). This issue was reported by René Mayrhofer. [Closes ticket 20163; changes file written by teor. This paragraph added by nickm]
This commit is contained in:
committed by
Nick Mathewson
parent
ae4077916c
commit
3b2f012e28
@@ -0,0 +1,6 @@
|
||||
o Minor bugfixes (address discovery):
|
||||
- Stop reordering IP addresses returned by the OS.
|
||||
This makes is more likely that Tor will guess the same relay IP address every time.
|
||||
Fixes issue 20163; bugfix on 0.2.7.1-alpha, ticket 17027.
|
||||
Reported by René Mayrhofer, patch by "cypherpunks".
|
||||
|
||||
@@ -1770,13 +1770,13 @@ MOCK_IMPL(smartlist_t *,get_interface_address6_list,(int severity,
|
||||
{
|
||||
if (tor_addr_is_loopback(a) ||
|
||||
tor_addr_is_multicast(a)) {
|
||||
SMARTLIST_DEL_CURRENT(addrs, a);
|
||||
SMARTLIST_DEL_CURRENT_KEEPORDER(addrs, a);
|
||||
tor_free(a);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!include_internal && tor_addr_is_internal(a, 0)) {
|
||||
SMARTLIST_DEL_CURRENT(addrs, a);
|
||||
SMARTLIST_DEL_CURRENT_KEEPORDER(addrs, a);
|
||||
tor_free(a);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user