Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net do not filter address families that are not sup...
details: https://anonhg.NetBSD.org/src/rev/4acecafd4a90
branches: trunk
changeset: 480670:4acecafd4a90
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jan 17 15:57:29 2000 +0000
description:
do not filter address families that are not supported by kernel.
the behavior was introduced in 1.8 -> 1.9, by itojun, and 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 nonetheless.
diffstat:
lib/libc/net/getaddrinfo.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r f8a5bd99384c -r 4acecafd4a90 lib/libc/net/getaddrinfo.c
--- a/lib/libc/net/getaddrinfo.c Mon Jan 17 15:51:59 2000 +0000
+++ b/lib/libc/net/getaddrinfo.c Mon Jan 17 15:57:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getaddrinfo.c,v 1.18 2000/01/17 08:34:04 itojun Exp $ */
+/* $NetBSD: getaddrinfo.c,v 1.19 2000/01/17 15:57:29 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -477,7 +477,9 @@
const char *servname;
struct addrinfo **res;
{
+#if 0
int s;
+#endif
struct hostent *hp;
int h_error;
int af;
@@ -495,6 +497,7 @@
sentinel.ai_next = NULL;
cur = &sentinel;
+#if 0
/*
* filter out AFs that are not supported by the kernel
* XXX errno?
@@ -505,6 +508,7 @@
return 0;
} else
close(s);
+#endif
/*
* if the servname does not match socktype/protocol, ignore it.
Home |
Main Index |
Thread Index |
Old Index