Skip to content

Commit

Permalink
dns_utils: really add default DNSSEC servers on failure
Browse files Browse the repository at this point in the history
Coverity 196597
  • Loading branch information
moneromooo-monero committed Mar 20, 2019
1 parent f2f725d commit 223c6b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/common/dns_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,8 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData())
ub_ctx_delete(m_data->m_ub_context);
m_data->m_ub_context = ub_ctx_create();
add_anchors(m_data->m_ub_context);
dns_public_addr = tools::dns_utils::parse_dns_public(DNS_PUBLIC);
for (const auto &ip: dns_public_addr)
ub_ctx_set_fwd(m_data->m_ub_context, string_copy(ip.c_str()));
for (const auto &ip: DEFAULT_DNS_PUBLIC_ADDR)
ub_ctx_set_fwd(m_data->m_ub_context, string_copy(ip));
ub_ctx_set_option(m_data->m_ub_context, string_copy("do-udp:"), string_copy("no"));
ub_ctx_set_option(m_data->m_ub_context, string_copy("do-tcp:"), string_copy("yes"));
}
Expand Down

0 comments on commit 223c6b0

Please sign in to comment.