summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/dns.c8
-rw-r--r--src/src/host.c5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/src/dns.c b/src/src/dns.c
index 27ab2d2a2..9859e8365 100644
--- a/src/src/dns.c
+++ b/src/src/dns.c
@@ -1112,8 +1112,7 @@ return DNS_FAIL;
* Get address(es) from DNS record *
*************************************************/
-/* The record type is either T_A for an IPv4 address or T_AAAA (or T_A6 when
-supported) for an IPv6 address.
+/* The record type is either T_A for an IPv4 address or T_AAAA for an IPv6 address.
Argument:
dnsa the DNS answer block
@@ -1145,8 +1144,11 @@ else
{
if (rr->data + 16 <= dnsa_lim)
{
+ struct in6_addr in6;
+ int i;
+ for (i = 0; i < 16; i++) in6.__in6_u.__u6_addr8[i] = rr->data[i];
yield = store_get(sizeof(dns_address) + 50);
- inet_ntop(AF_INET6, US rr->data, CS yield->address, 50);
+ inet_ntop(AF_INET6, &in6, CS yield->address, 50);
yield->next = NULL;
}
}
diff --git a/src/src/host.c b/src/src/host.c
index 67d33a9b8..4099a7506 100644
--- a/src/src/host.c
+++ b/src/src/host.c
@@ -2408,10 +2408,7 @@ for (; i >= 0; i--)
{
if (rr->type == type)
{
- /* dns_address *da = dns_address_from_rr(&dnsa, rr); */
-
- dns_address *da;
- da = dns_address_from_rr(&dnsa, rr);
+ dns_address *da = dns_address_from_rr(&dnsa, rr);
DEBUG(D_host_lookup)
if (!da) debug_printf("no addresses extracted from A6 RR for %s\n",