getaddrinfo() without hints defaults to:
ai_flags = AI_ADDRCONFIG|AI_V4MAPPED with glibc, and
ai_flags = 0 with musl libc.
That means musl by default returns addresses that may be unreachable from the current machine whereas glibc won't.
And on the flip side, glibc will return IPv4-over-IPv6 addresses if no IPv6 address for that host exists whereas musl won't.
We should probably harmonize that one way or the other but what's the preferred behavior and why?
getaddrinfo() without hints defaults to:
ai_flags = AI_ADDRCONFIG|AI_V4MAPPEDwith glibc, andai_flags = 0with musl libc.That means musl by default returns addresses that may be unreachable from the current machine whereas glibc won't.
And on the flip side, glibc will return IPv4-over-IPv6 addresses if no IPv6 address for that host exists whereas musl won't.
We should probably harmonize that one way or the other but what's the preferred behavior and why?