summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoritojun <>2000-01-17 15:58:11 +0000
committeritojun <>2000-01-17 15:58:11 +0000
commit8a07f19227756bde70a93fb12b48cccc18eba9c3 (patch)
tree029871ff8bfaab61b72cabdf544d4cfd0d240739 /src
parent3db265033565d5b8e7d12707bf6dbf36ab0fe368 (diff)
downloadopenbsd-8a07f19227756bde70a93fb12b48cccc18eba9c3.tar.gz
openbsd-8a07f19227756bde70a93fb12b48cccc18eba9c3.tar.bz2
openbsd-8a07f19227756bde70a93fb12b48cccc18eba9c3.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/net/getaddrinfo.c6
1 files changed, 5 insertions, 1 deletions
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 @@
1/* $OpenBSD: getaddrinfo.c,v 1.6 2000/01/17 08:15:26 itojun Exp $ */ 1/* $OpenBSD: getaddrinfo.c,v 1.7 2000/01/17 15:58:11 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -440,7 +440,9 @@ explore_fqdn(pai, hostname, servname, res)
440 const char *servname; 440 const char *servname;
441 struct addrinfo **res; 441 struct addrinfo **res;
442{ 442{
443#if 0
443 int s; 444 int s;
445#endif
444 struct hostent *hp; 446 struct hostent *hp;
445 int h_error; 447 int h_error;
446 int af; 448 int af;
@@ -458,6 +460,7 @@ explore_fqdn(pai, hostname, servname, res)
458 sentinel.ai_next = NULL; 460 sentinel.ai_next = NULL;
459 cur = &sentinel; 461 cur = &sentinel;
460 462
463#if 0
461 /* 464 /*
462 * filter out AFs that are not supported by the kernel 465 * filter out AFs that are not supported by the kernel
463 * XXX errno? 466 * XXX errno?
@@ -468,6 +471,7 @@ explore_fqdn(pai, hostname, servname, res)
468 return 0; 471 return 0;
469 } else 472 } else
470 close(s); 473 close(s);
474#endif
471 475
472 /* 476 /*
473 * if the servname does not match socktype/protocol, ignore it. 477 * if the servname does not match socktype/protocol, ignore it.