[Bug network/15015] getaddrinfo returns EAI_SERVICE with SOCK_RAW
aoliva at sourceware dot org
sourceware-bugzilla@sourceware.org
Sat Sep 27 06:28:00 GMT 2014
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.
More information about the Glibc-bugs
mailing list