diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:39:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:39:45 -0400 |
commit | 9fba014e3f7f89520841b65b8b038e5fb931b1d6 (patch) | |
tree | 2197904844e7ae25b4a2d6465c2aa0cca1798019 /src/or/eventdns.c | |
parent | 6d5478a8a7734553fc84574e725625610f46dc8c (diff) | |
parent | 8fb38331c3213caef2d2e003e02cdb361504f14f (diff) | |
download | tor-9fba014e3f7f89520841b65b8b038e5fb931b1d6.tar.gz tor-9fba014e3f7f89520841b65b8b038e5fb931b1d6.zip |
Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023
Conflicts in various places, mainly node-related. Resolved them in
favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022.
src/common/Makefile.am
src/or/circuitlist.c
src/or/connection_edge.c
src/or/directory.c
src/or/microdesc.c
src/or/networkstatus.c
src/or/router.c
src/or/routerlist.c
src/test/test_util.c
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index e9770c8c72..fb05e48d33 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -461,7 +461,7 @@ sockaddr_eq(const struct sockaddr *sa1, const struct sockaddr *sa2, const struct sockaddr_in6 *sin1, *sin2; sin1 = (const struct sockaddr_in6 *)sa1; sin2 = (const struct sockaddr_in6 *)sa2; - if (memcmp(sin1->sin6_addr.s6_addr, sin2->sin6_addr.s6_addr, 16)) + if (tor_memneq(sin1->sin6_addr.s6_addr, sin2->sin6_addr.s6_addr, 16)) return 0; else if (include_port && sin1->sin6_port != sin2->sin6_port) return 0; @@ -2253,7 +2253,7 @@ sockaddr_is_loopback(const struct sockaddr *addr) return (ntohl(sin->sin_addr.s_addr) & 0xff000000) == 0x7f000000; } else if (addr->sa_family == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)addr; - return !memcmp(sin6->sin6_addr.s6_addr, LOOPBACK_S6, 16); + return fast_memeq(sin6->sin6_addr.s6_addr, LOOPBACK_S6, 16); } return 0; } |