mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Make sure that [::1] is recognized as a private address
Fixes bug 8377; bugfix on 0.2.1.3-alpha.
This commit is contained in:
parent
5e0ce4c578
commit
b528aaef03
3
changes/bug8377
Normal file
3
changes/bug8377
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- Correctly recognize that [::1] is a loopback address. Fixes bug #8377;
|
||||
bugfix on 0.2.1.3-alpha.
|
@ -779,7 +779,8 @@ tor_addr_is_loopback(const tor_addr_t *addr)
|
||||
case AF_INET6: {
|
||||
/* ::1 */
|
||||
uint32_t *a32 = tor_addr_to_in6_addr32(addr);
|
||||
return (a32[0] == 0) && (a32[1] == 0) && (a32[2] == 0) && (a32[3] == 1);
|
||||
return (a32[0] == 0) && (a32[1] == 0) && (a32[2] == 0) &&
|
||||
(ntohl(a32[3]) == 1);
|
||||
}
|
||||
case AF_INET:
|
||||
/* 127.0.0.1 */
|
||||
|
Loading…
Reference in New Issue
Block a user