mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Bugfix: we don't want loopback/multicastaddress from _hack().
This commit is contained in:
parent
6af471f394
commit
92fc728d83
@ -1542,8 +1542,16 @@ get_interface_address6_via_udp_socket_hack(int severity,
|
||||
goto err;
|
||||
}
|
||||
|
||||
tor_addr_from_sockaddr(addr, (struct sockaddr*)&my_addr, NULL);
|
||||
r=0;
|
||||
if (tor_addr_from_sockaddr(addr, (struct sockaddr*)&my_addr, NULL) == 0) {
|
||||
if (tor_addr_is_loopback(addr) || tor_addr_is_multicast(addr)) {
|
||||
log_fn(severity, LD_NET, "Address that we determined via UDP socket"
|
||||
" magic is unsuitable for public comms.");
|
||||
}
|
||||
else {
|
||||
r=0;
|
||||
}
|
||||
}
|
||||
|
||||
err:
|
||||
if (sock >= 0)
|
||||
tor_close_socket(sock);
|
||||
|
Loading…
Reference in New Issue
Block a user