Skip to content

dns: getaddrinfo() differences between glibc and musl #2225

Description

@bnoordhuis

getaddrinfo() without hints defaults to:

  1. ai_flags = AI_ADDRCONFIG|AI_V4MAPPED with glibc, and
  2. 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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementnot-staleIssues that should never be marked stale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions