Remove LDNS dep and fix a bug in libunbound const correctness fix
This commit is contained in:
parent
2248124453
commit
fab95aef64
|
@ -125,7 +125,7 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)
|
||||||
|
|
||||||
strncpy(urlC, url.c_str(), 999);
|
strncpy(urlC, url.c_str(), 999);
|
||||||
urlC[999] = '\0';
|
urlC[999] = '\0';
|
||||||
if (!check_address_syntax(url))
|
if (!check_address_syntax(urlC))
|
||||||
{
|
{
|
||||||
return addresses;
|
return addresses;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
|
||||||
strncpy(urlC, url.c_str(), 999);
|
strncpy(urlC, url.c_str(), 999);
|
||||||
urlC[999] = '\0';
|
urlC[999] = '\0';
|
||||||
|
|
||||||
if (!check_address_syntax(url))
|
if (!check_address_syntax(urlC))
|
||||||
{
|
{
|
||||||
return addresses;
|
return addresses;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ std::vector<std::string> DNSResolver::get_txt_record(const std::string& url)
|
||||||
strncpy(urlC, url.c_str(), 999);
|
strncpy(urlC, url.c_str(), 999);
|
||||||
urlC[999] = '\0';
|
urlC[999] = '\0';
|
||||||
|
|
||||||
if (!check_address_syntax(url))
|
if (!check_address_syntax(urlC))
|
||||||
{
|
{
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace tools
|
||||||
// RFC defines for record types and classes for DNS, gleaned from ldns source
|
// RFC defines for record types and classes for DNS, gleaned from ldns source
|
||||||
const static int DNS_CLASS_IN = 1;
|
const static int DNS_CLASS_IN = 1;
|
||||||
const static int DNS_TYPE_A = 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;
|
const static int DNS_TYPE_AAAA = 8;
|
||||||
|
|
||||||
struct DNSResolverData;
|
struct DNSResolverData;
|
||||||
|
|
Loading…
Reference in New Issue