about summary refs log tree commit diff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/nss_dns/dns-host.c10
-rw-r--r--nss/nss_dns/dns-network.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/nss/nss_dns/dns-host.c b/nss/nss_dns/dns-host.c
index f8116fed34..df8677abfa 100644
--- a/nss/nss_dns/dns-host.c
+++ b/nss/nss_dns/dns-host.c
@@ -209,7 +209,10 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
 
   n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer));
   if (n < 0)
-    return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
+    return (errno == ECONNREFUSED
+	    || errno == EPFNOSUPPORT
+	    || errno == EAFNOSUPPORT) 
+      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 
   return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
 		      h_errnop);
@@ -302,7 +305,10 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
   n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
 		 sizeof host_buffer);
   if (n < 0)
-    return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
+    return (errno == ECONNREFUSED
+	    || errno == EPFNOSUPPORT
+	    || errno == EAFNOSUPPORT) 
+      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 
   status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
 			h_errnop);
diff --git a/nss/nss_dns/dns-network.c b/nss/nss_dns/dns-network.c
index b714128f1d..1b5d0ce71b 100644
--- a/nss/nss_dns/dns-network.c
+++ b/nss/nss_dns/dns-network.c
@@ -116,7 +116,10 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
 		       sizeof (querybuf));
   if (anslen < 0)
     /* Nothing found.  */
-    return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
+    return (errno == ECONNREFUSED
+	    || errno == EPFNOSUPPORT
+	    || errno == EAFNOSUPPORT) 
+      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 
   return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
 }
@@ -168,7 +171,10 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
 		      sizeof (querybuf));
   if (anslen < 0)
     /* Nothing found.  */
-    return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
+    return (errno == ECONNREFUSED
+	    || errno == EPFNOSUPPORT
+	    || errno == EAFNOSUPPORT) 
+      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 
   status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
   if (status == NSS_STATUS_SUCCESS)