diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-18 15:28:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-18 15:28:39 -0400 |
commit | 2ac66e59f7b32bb7f975803c9d483848e755a08f (patch) | |
tree | e02bab0adfd33fc7b320bc2e8ec9f514a27ea3aa /src/common/address.c | |
parent | 5959d1c10581399efb46eeb6c0de66547894ed65 (diff) | |
parent | ebb95d0f781e21a694a8de386ed0b75984b247d4 (diff) | |
download | tor-2ac66e59f7b32bb7f975803c9d483848e755a08f.tar.gz tor-2ac66e59f7b32bb7f975803c9d483848e755a08f.zip |
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
Conflicts:
src/test/test_addr.c
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/address.c b/src/common/address.c index 69e7f68103..227b4fbaee 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -817,7 +817,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 */ |