aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-06-20 22:41:18 +0200
committerRiccardo Spagni <ric@spagni.net>2015-06-20 22:41:30 +0200
commit1720affbd628db150a67e7ef09817f3f8707ee55 (patch)
treefe9bcf592fa277472ab64595a0f4ef572245cdb0 /src
parentMerge pull request #324 (diff)
parentSet dnssec_valid value correctly in dns_utils; fix address_from_url test (diff)
downloadmonero-1720affbd628db150a67e7ef09817f3f8707ee55.tar.xz
Merge pull request #325
3ade396 Set dnssec_valid value correctly in dns_utils; fix address_from_url test (Rostislav)
Diffstat (limited to '')
-rw-r--r--src/common/dns_utils.cpp6
1 files changed, 3 insertions, 3 deletions
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<std::string> 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<std::string> 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<std::string> 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++)