From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 3 19:14:14 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95D3616A421 for ; Sun, 3 Feb 2008 19:14:14 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5E36513C4D3 for ; Sun, 3 Feb 2008 19:14:14 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:vOERczfgeRNjqtt4jKx5C76SbT39FMFw0fRiMhilKkEab/rpJuGbkdH2y4s/zVor@kasuga.mahoroba.org [IPv6:2001:2f0:104:8010:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.8/8.13.8) with ESMTP/inet6 id m13JDmMA038735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Feb 2008 04:13:53 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Mon, 04 Feb 2008 04:13:47 +0900 Message-ID: From: Hajimu UMEMOTO To: "Heiko Wundram (Beenic)" In-Reply-To: <200802031450.19420.wundram@beenic.net> References: <200802031450.19420.wundram@beenic.net> User-Agent: xcite1.57> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (i386-pc-freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.3-RELEASE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (ameno.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Mon, 04 Feb 2008 04:13:53 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on ameno.mahoroba.org Cc: hackers@freebsd.org Subject: Re: getaddrinfo() spec doesn't match behaviour X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 19:14:14 -0000 Hi, >>>>> On Sun, 3 Feb 2008 14:50:18 +0100 >>>>> "Heiko Wundram (Beenic)" said: wundram> hints.ai_flags is logically anded with AI_MASK at the beginning of the wundram> function, and AI_MASK (at least in my local netdb.h header) does not contain wundram> the flag AI_V4MAPPED. In case the result of that is non-zero (which it is due wundram> to me specifying AI_V4MAPPED), the function returns EAI_BADFLAGS. wundram> After that, getaddrinfo() does some checks on AI_V4MAPPED and AI_ALL (masking wundram> the respective flags in case the ai_family isn't AF_INET6), which are wundram> basically superfluous (as they can never be set anyway due to AI_MASK), but I wundram> didn't find any other reference to the flag in the whole of wundram> lib/libc/net/getaddrinfo.c, so I actually don't know whether the cause of wundram> this failing is that it simply isn't implemented (completely), or there's any wundram> other reason for AI_MASK not to contain these flags that I haven't grasped so wundram> far. Since the part is incomplete support of AI_ALL and AI_V4MAPPED, I've just nuked it. http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/getaddrinfo.c#rev1.87 Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/