Oops: make the check for not adding ip->ip DNS maps correct

This commit is contained in:
Nick Mathewson 2012-11-25 13:38:27 -05:00
parent d3e9e03cac
commit 32219d8313

View File

@ -629,7 +629,7 @@ client_dns_set_addressmap(origin_circuit_t *on_circ,
tor_assert(address); tor_assert(address);
tor_assert(val); tor_assert(val);
if (tor_addr_parse(&addr_tmp, address) == 0) if (tor_addr_parse(&addr_tmp, address) >= 0)
return; /* If address was an IP address already, don't add a mapping. */ return; /* If address was an IP address already, don't add a mapping. */
/* XXXXX For now, don't cache IPv6 addresses. */ /* XXXXX For now, don't cache IPv6 addresses. */