Port DNS_Mgr to use new IPAddr class, enable lookups on IPv6 addrs.

Host lookups still need to be changed to also do AAAA queries.
This commit is contained in:
Jon Siwek 2012-02-13 15:57:59 -06:00
parent c0f05f57a7
commit 0f207c243c
6 changed files with 61 additions and 84 deletions

View file

@ -186,7 +186,7 @@ _nb_dns_cmpsockaddr(register struct sockaddr *sa1,
#endif
static const char serr[] = "answer from wrong nameserver (%d)";
if (sa1->sa_family != sa1->sa_family) {
if (sa1->sa_family != sa2->sa_family) {
snprintf(errstr, NB_DNS_ERRSIZE, serr, 1);
return (-1);
}
@ -381,7 +381,7 @@ nb_dns_addr_request2(register struct nb_dns_info *nd, char *addrp,
size -= i;
cp += i;
}
snprintf(cp, size, "ip6.int");
snprintf(cp, size, "ip6.arpa");
break;
#endif