getaddrinfo() not correctly accepting some flag combinations
|Reported by:||anevilyak||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
Haiku's getaddrinfo() returns an error indicating invalid flags with the following sample code:
struct addrinfo *ai; struct addrinfo hints; memset (&hints, '\0', sizeof (hints)); hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; hints.ai_socktype = SOCK_STREAM; int e = getaddrinfo (NULL, "113", &hints, &ai);
All the documentation I've read indicates that this set of flags is correct though. Removing AI_ADDRCONFIG from the flags results in normal behavior though. I suspect this is due to some hack to temporarily disable IPv6 functionality, but haven't looked more closely. The error returned was 3, which gai_strerror() indicates as being "invalid flags".