aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/dns_utils.cpp6
-rw-r--r--src/common/dns_utils.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index 4b43c7492..346761e74 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -125,7 +125,7 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
- if (!check_address_syntax(url))
+ if (!check_address_syntax(urlC))
{
return addresses;
}
@@ -156,7 +156,7 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
- if (!check_address_syntax(url))
+ if (!check_address_syntax(urlC))
{
return addresses;
}
@@ -186,7 +186,7 @@ std::vector<std::string> DNSResolver::get_txt_record(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
- if (!check_address_syntax(url))
+ if (!check_address_syntax(urlC))
{
return records;
}
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h
index d22e3fb1f..dd6946dc4 100644
--- a/src/common/dns_utils.h
+++ b/src/common/dns_utils.h
@@ -35,7 +35,7 @@ namespace tools
// RFC defines for record types and classes for DNS, gleaned from ldns source
const static int DNS_CLASS_IN = 1;
const static int DNS_TYPE_A = 1;
-const static int DNS_TYPE_TXT = 6;
+const static int DNS_TYPE_TXT = 16;
const static int DNS_TYPE_AAAA = 8;
struct DNSResolverData;