From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1965 invoked by alias); 3 Jan 2013 14:54:20 -0000 Received: (qmail 1882 invoked by uid 48); 3 Jan 2013 14:53:58 -0000 From: "psimerda at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug network/14415] AI_V4MAPPED is useless with AI_UNSPEC but they're used together as defaults when hints=NULL Date: Thu, 03 Jan 2013 14:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: network X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: psimerda at redhat dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00008.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=3D14415 --- Comment #5 from Pavel =C5=A0imerda 2013-01= -03 14:53:57 UTC --- Created attachment 6794 --> http://sourceware.org/bugzilla/attachment.cgi?id=3D6794 getaddrinfo: use zero ai_flags by default According to POSIX1-2008, AI_V4MAPPED flag shall be ignored unless ai_family equals AF_INET6. In the default hints, ai_family is AF_UNSPEC. Therefore AI_V4MAPPED is redundant. AI_ADDRCONFIG can potentially be beneficial to applications that use getaddrinfo() results to immediately call connect(), sendto() and similar functions to avoid querying redundant DNS records according to the current address configuration. Those applications will also need to specify ai_socktype and/or ai_protocol and therefore will not use hints=3DNULL. As AI_DEFAULT is n= ot a part of the public API, such applications will not be able to use the default flags at all. Please note that POSIX1-2008 doesn't define any default flags at all. Resolves: #14415, #14965 --=20 Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.