From 8a07f19227756bde70a93fb12b48cccc18eba9c3 Mon Sep 17 00:00:00 2001 From: itojun <> Date: Mon, 17 Jan 2000 15:58:11 +0000 Subject: do not filter address families that are not supported by kernel. it was not a correct behavior. even if we may be able to connect to the the returned addresses, filtering them out is not a correct thing to do. for example, even if you have partial unreachablility in IPv4, gethostbyname(3) will return IPv4 addresses in the unreachable network anyways. --- src/lib/libc/net/getaddrinfo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c index 3fa1ce01d4..d4cd76b30c 100644 --- a/src/lib/libc/net/getaddrinfo.c +++ b/src/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.6 2000/01/17 08:15:26 itojun Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.7 2000/01/17 15:58:11 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -440,7 +440,9 @@ explore_fqdn(pai, hostname, servname, res) const char *servname; struct addrinfo **res; { +#if 0 int s; +#endif struct hostent *hp; int h_error; int af; @@ -458,6 +460,7 @@ explore_fqdn(pai, hostname, servname, res) sentinel.ai_next = NULL; cur = &sentinel; +#if 0 /* * filter out AFs that are not supported by the kernel * XXX errno? @@ -468,6 +471,7 @@ explore_fqdn(pai, hostname, servname, res) return 0; } else close(s); +#endif /* * if the servname does not match socktype/protocol, ignore it. -- cgit v1.2.3-55-g6feb