diff options
author | Jeffrey Ryan <jeffreyryan@tutanota.com> | 2022-11-21 15:54:23 -0600 |
---|---|---|
committer | Jeffrey Ryan <jeffreyryan@tutanota.com> | 2022-11-21 21:16:16 -0600 |
commit | 2c2432245f40377ee31c21e42d34a473f09601fe (patch) | |
tree | e94a8b0db6e4cc6c41d55d3c47ade46ca6bb8ead /src/common/dns_utils.cpp | |
parent | Merge pull request #8594 (diff) | |
download | monero-2c2432245f40377ee31c21e42d34a473f09601fe.tar.xz |
DNSResolver: fix not handling hostnames without dot characters [release]
Unrelated, but similar code-wise to #8643. There is a check in `DNSResolver` which automatically fails to resolve hostnames which do not contain the `.` character. This PR removes that check.
Diffstat (limited to 'src/common/dns_utils.cpp')
-rw-r--r-- | src/common/dns_utils.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 7bb1781d4..44e4258d9 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -327,11 +327,6 @@ std::vector<std::string> DNSResolver::get_record(const std::string& url, int rec dnssec_available = false; dnssec_valid = false; - if (!check_address_syntax(url.c_str())) - { - return addresses; - } - // destructor takes care of cleanup ub_result_ptr result; @@ -414,16 +409,6 @@ DNSResolver DNSResolver::create() return DNSResolver(); } -bool DNSResolver::check_address_syntax(const char *addr) const -{ - // if string doesn't contain a dot, we won't consider it a url for now. - if (strchr(addr,'.') == NULL) - { - return false; - } - return true; -} - namespace dns_utils { |