aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/gethnamaddr.c4
-rw-r--r--resolv/nss_dns/dns-host.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 117e4a321e..14758df231 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -696,6 +696,10 @@ gethostbyaddr(addr, len, af)
abort();
}
n = res_nquery(&_res, qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
+ if (n < 0 && af == AF_INET6) {
+ strcpy(qp, "ip6.int");
+ n = res_nquery(&_res, qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
+ }
if (n < 0) {
dprintf("res_nquery failed (%d)\n", n);
if (errno == ECONNREFUSED)
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 7b82486803..f5e3058cbd 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -291,6 +291,12 @@ _nss_dns_gethostbyaddr_r (const void *addr, socklen_t len, int af,
n = res_nquery (&_res, qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
sizeof host_buffer);
+ if (n < 0 && af == AF_INET6)
+ {
+ strcpy (qp, "ip6.int");
+ n = res_nquery (&_res, qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
+ sizeof host_buffer);
+ }
if (n < 0)
{
*h_errnop = h_errno;