This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14415] New: AI_V4MAPPED is useless with AI_UNSPEC but they're used together as defaults when hints=NULL
- From: "psimerda at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 28 Jul 2012 09:38:50 +0000
- Subject: [Bug network/14415] New: AI_V4MAPPED is useless with AI_UNSPEC but they're used together as defaults when hints=NULL
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14415
Bug #: 14415
Summary: AI_V4MAPPED is useless with AI_UNSPEC but they're used
together as defaults when hints=NULL
Product: glibc
Version: 2.15
Status: NEW
Severity: minor
Priority: P2
Component: network
AssignedTo: unassigned@sourceware.org
ReportedBy: psimerda@redhat.com
Classification: Unclassified
>From 'man getaddrinfo':
Specifying hints as NULL is equivalent to setting ai_socktype and
ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to
(AI_V4MAPPED | AI_ADDRCONFIG).
...
If hint.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family
was specified as AF_INET6, and no matching IPv6 addresses could be
found, then return IPv4-mapped IPv6 addresses in the list pointed to
by res. If both AI_V4MAPPED and AI_ALL are specified in hints.ai_flags,
then return both IPv6 and IPv4-mapped IPv6 addresses in the list pointed
to by res. AI_ALL is ignored if AI_V4MAPPED is not also specified.
As I read it, AI_V4MAPPED is useless without AF_INET6. So either it is wrong,
or I miss something about AI_V4MAPPED that should be documented in the manpage.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.