mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
r8968@Kushana: nickm | 2006-09-26 17:53:27 -0400
Fix for reverse dns: only assume we will get an answer when the result was success. svn:r8507
This commit is contained in:
parent
3994b02c0e
commit
cd2425ffa0
@ -861,8 +861,13 @@ add_answer_to_cache(const char *address, int is_reverse, uint32_t addr,
|
||||
strlcpy(resolve->address, address, sizeof(resolve->address));
|
||||
resolve->is_reverse = is_reverse;
|
||||
if (is_reverse) {
|
||||
if (outcome == DNS_RESOLVE_SUCCEEDED) {
|
||||
tor_assert(hostname);
|
||||
resolve->result.hostname = tor_strdup(hostname);
|
||||
} else {
|
||||
tor_assert(! hostname);
|
||||
resolve->result.hostname = NULL;
|
||||
}
|
||||
} else {
|
||||
tor_assert(!hostname);
|
||||
resolve->result.addr = addr;
|
||||
|
Loading…
Reference in New Issue
Block a user