summaryrefslogtreecommitdiffstats
path: root/contrib/bind/lib/irs/gethostent.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/lib/irs/gethostent.c')
-rw-r--r--contrib/bind/lib/irs/gethostent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/bind/lib/irs/gethostent.c b/contrib/bind/lib/irs/gethostent.c
index 5d316c8..5aa46c5 100644
--- a/contrib/bind/lib/irs/gethostent.c
+++ b/contrib/bind/lib/irs/gethostent.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gethostent.c,v 1.27 2000/04/20 07:10:33 vixie Exp $";
+static const char rcsid[] = "$Id: gethostent.c,v 1.28 2001/03/01 05:47:44 marka Exp $";
#endif
/* Imports */
@@ -138,7 +138,8 @@ gethostbyname2_p(const char *name, int af, struct net_data *net_data) {
if (!net_data || !(ho = net_data->ho))
return (NULL);
- if (net_data->ho_stayopen && net_data->ho_last) {
+ if (net_data->ho_stayopen && net_data->ho_last &&
+ net_data->ho_last->h_addrtype == af) {
if (ns_samename(name, net_data->ho_last->h_name) == 1)
return (net_data->ho_last);
for (hap = net_data->ho_last->h_aliases; hap && *hap; hap++)
OpenPOWER on IntegriCloud