summaryrefslogtreecommitdiffstats
path: root/net/dns/dns_response.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/dns/dns_response.cc')
-rw-r--r--net/dns/dns_response.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/dns/dns_response.cc b/net/dns/dns_response.cc
index 4ab7296..4ad6465 100644
--- a/net/dns/dns_response.cc
+++ b/net/dns/dns_response.cc
@@ -280,13 +280,15 @@ DnsResponse::Result DnsResponse::ParseToAddressList(
}
// TODO(szym): Extract TTL for NODATA results. http://crbug.com/115051
+ if (ip_addresses.empty())
+ return DNS_NO_ADDRESSES;
// getcanonname in eglibc returns the first owner name of an A or AAAA RR.
// If the response passed all the checks so far, then |expected_name| is it.
*addr_list = AddressList::CreateFromIPAddressList(ip_addresses,
expected_name);
*ttl = base::TimeDelta::FromSeconds(std::min(cname_ttl_sec, addr_ttl_sec));
- return DNS_PARSE_OK;
+ return DNS_SUCCESS;
}
} // namespace net