This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/15015] getaddrinfo returns EAI_SERVICE with SOCK_RAW


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]