From fab95aef64e2e5ba209ca2f27763a8db489d4294 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Wed, 24 Sep 2014 23:19:14 -0400 Subject: [PATCH] Remove LDNS dep and fix a bug in libunbound const correctness fix --- src/common/dns_utils.cpp | 6 +++--- src/common/dns_utils.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 4b43c749..346761e7 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -125,7 +125,7 @@ std::vector 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 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 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 d22e3fb1..dd6946dc 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;