This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/15015] getaddrinfo returns EAI_SERVICE with SOCK_RAW
- From: "aoliva at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 27 Sep 2014 06:28:50 +0000
- Subject: [Bug network/15015] getaddrinfo returns EAI_SERVICE with SOCK_RAW
- Auto-submitted: auto-generated
- References: <bug-15015-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15015
Alexandre Oliva <aoliva at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |aoliva at sourceware dot org
Resolution|--- |INVALID
--- Comment #8 from Alexandre Oliva <aoliva at sourceware dot org> ---
Pablo,
The interaction with the netlink raw socket is what getaddrinfo uses to
implement AI_ADDRCONFIG: it has to query the kernel about what address families
are enabled so that it can narrow the search to them, as requested.
You can ask getaddrinfo for SOCK_RAW addresses, for sure, but then servname has
to be NULL, because raw sockets, not being transport level sockets, don't
support port numbers (thus no services).
It is true that getaddrinfo could check that the caller supplied conflicting
parameters earlier, avoiding the netlink query, but the query is cached and
will likely remain valid at the next AI_ADDRCONFIG query, so it's not worth the
additional complexity in getaddrinfo.
--
You are receiving this mail because:
You are on the CC list for the bug.