about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-02 20:21:30 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-02 20:21:30 +0000
commit2044256d3320857942046a9b87cb4cda62b5b20c (patch)
tree115b0b2b66720484d0f3b34deb70e55ae4c5e751
parentba81f39e0f31bbb5f09d5a74a2ef9ca9b933ee0c (diff)
downloadglibc-2044256d3320857942046a9b87cb4cda62b5b20c.tar.gz
glibc-2044256d3320857942046a9b87cb4cda62b5b20c.tar.xz
glibc-2044256d3320857942046a9b87cb4cda62b5b20c.zip
(_nss_dns_gethostbyaddr_r): Try ip6.int if ip6.arpa fails.
-rw-r--r--resolv/nss_dns/dns-host.c6
1 files changed, 6 insertions, 0 deletions
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;