From 3ade396406493708da31e69cd3e3b3d1cbb04924 Mon Sep 17 00:00:00 2001 From: Rostislav Date: Sat, 20 Jun 2015 20:02:13 +0000 Subject: Set dnssec_valid value correctly in dns_utils; fix address_from_url test --- src/common/dns_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 9561f6b46..e442d3d81 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -232,7 +232,7 @@ std::vector DNSResolver::get_ipv4(const std::string& url, bool& dns if (!ub_resolve(m_data->m_ub_context, urlC, DNS_TYPE_A, DNS_CLASS_IN, &result)) { dnssec_available = (result->secure || (!result->secure && result->bogus)); - dnssec_valid = !result->bogus; + dnssec_valid = result->secure && !result->bogus; if (result->havedata) { for (size_t i=0; result->data[i] != NULL; i++) @@ -263,7 +263,7 @@ std::vector DNSResolver::get_ipv6(const std::string& url, bool& dns if (!ub_resolve(m_data->m_ub_context, urlC, DNS_TYPE_AAAA, DNS_CLASS_IN, &result)) { dnssec_available = (result->secure || (!result->secure && result->bogus)); - dnssec_valid = !result->bogus; + dnssec_valid = result->secure && !result->bogus; if (result->havedata) { for (size_t i=0; result->data[i] != NULL; i++) @@ -294,7 +294,7 @@ std::vector DNSResolver::get_txt_record(const std::string& url, boo if (!ub_resolve(m_data->m_ub_context, urlC, DNS_TYPE_TXT, DNS_CLASS_IN, &result)) { dnssec_available = (result->secure || (!result->secure && result->bogus)); - dnssec_valid = !result->bogus; + dnssec_valid = result->secure && !result->bogus; if (result->havedata) { for (size_t i=0; result->data[i] != NULL; i++) -- cgit v1.2.3