Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/net/getaddrinfo.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/net/getaddrinfo.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.82 retrieving revision 1.83 diff -u -p -r1.82 -r1.83 --- src/lib/libc/net/getaddrinfo.c 2006/03/25 12:09:40 1.82 +++ src/lib/libc/net/getaddrinfo.c 2006/07/18 14:00:40 1.83 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.82 2006/03/25 12:09:40 rpaulo Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.83 2006/07/18 14:00:40 christos Exp $ */ /* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */ /* @@ -32,7 +32,6 @@ /* * Issues to be discussed: - * - Thread safe-ness must be checked. * - Return values. There are nonstandard return values defined and used * in the source code. This is because RFC2553 is silent about which error * code must be returned for which situation. @@ -44,9 +43,6 @@ * invalid. * current code - SEGV on freeaddrinfo(NULL) * Note: - * - We use getipnodebyname() just for thread-safeness. There's no intent - * to let it do PF_UNSPEC (actually we never pass PF_UNSPEC to - * getipnodebyname(). * - The code filters out AFs that are not supported by the kernel, * when globbing NULL hostname (to loopback, or wildcard). Is it the right * thing to do? What is the relationship with post-RFC2553 AI_ADDRCONFIG @@ -55,31 +51,11 @@ * (1) what should we do against numeric hostname (2) what should we do * against NULL hostname (3) what is AI_ADDRCONFIG itself. AF not ready? * non-loopback address configured? global address configured? - * - To avoid search order issue, we have a big amount of code duplicate - * from gethnamaddr.c and some other places. The issues that there's no - * lower layer function to lookup "IPv4 or IPv6" record. Calling - * gethostbyname2 from getaddrinfo will end up in wrong search order, as - * follows: - * - The code makes use of following calls when asked to resolver with - * ai_family = PF_UNSPEC: - * getipnodebyname(host, AF_INET6); - * getipnodebyname(host, AF_INET); - * This will result in the following queries if the node is configure to - * prefer /etc/hosts than DNS: - * lookup /etc/hosts for IPv6 address - * lookup DNS for IPv6 address - * lookup /etc/hosts for IPv4 address - * lookup DNS for IPv4 address - * which may not meet people's requirement. - * The right thing to happen is to have underlying layer which does - * PF_UNSPEC lookup (lookup both) and return chain of addrinfos. - * This would result in a bit of code duplicate with _dns_ghbyname() and - * friends. */ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getaddrinfo.c,v 1.82 2006/03/25 12:09:40 rpaulo Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.83 2006/07/18 14:00:40 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h"