mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +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) {
|
||||
tor_assert(hostname);
|
||||
resolve->result.hostname = tor_strdup(hostname);
|
||||
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