This is the mail archive of the libc-help@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 #14967: getaddrinfo(NULL) with AI_PASSIVE wrong AF order - isthe proposed fix feasible?


Hi,

I've recently faced with the problem that 
getaddrinfo(NULL, srv, { AI_PASSIVE | AI_V4MAPPED, AF_UNSPEC},ret)
returns address families in the wrong order - INET,INET6 instead of INET6,INET - on dualstack host.

Googling further I've trapped on several existing bugs raised different times and bug 14967 in particular (I've attached other relevant from my point urls the the bug).

Debugging it with GDB revealed problem to be related to the way how address validation is performed and the fact that this validation (connect()-based) is not very suitable for AI_PASSIVE call (intended for bind()).

I've written and tested patch (attached to the case) and implemented ugly workaround in my code (simple reordering of the result). Now i wonder - if this bug is on the radar, whether it has other known and planned to implement solution, and if I can expect it to be fixed in some nearest future (which will obsolete implemented workaround)  or everyone is happy with the current state of art and each custome workaround is a personal tragedy of anyyone impacted?

Regards,
Ruslan


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