Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable returning IPv4 mapped IPv6 address on getaddrinfo() #3690

Closed
wants to merge 1 commit into from

Conversation

trengginas
Copy link
Member

This is to fix #3681

This ticket will add AI_V4MAPPED and AI_ALL to ai_flags when calling getaddrinfo() for IPv6.
It will enable getaddrinfo() to return IPv4 mapped IPv6 addresses, by default it will return the AAAA IPv6 only addresses.

If the AI_ALL flag is used in conjunction with the AI_V4MAPPED flag,
         and only used with the IPv6 address family.  When AI_ALL is logically
         or'd with AI_V4MAPPED flag then the caller wants all addresses: IPv6
         and IPv4-mapped IPv6.  A query is first made for AAAA records and if
         successful, the IPv6 addresses are returned.  Another query is then
         made for A records and any found are returned as IPv4-mapped IPv6
         addresses.  h_length will be 16.  Only if both queries fail does the
         function return a NULL pointer.  This flag is ignored unless af
         equals AF_INET6.  If both AI_ALL and AI_V4MAPPED are specified,
         AI_ALL takes precedence.

ref

@trengginas trengginas added this to the release-2.14 milestone Sep 8, 2023
@trengginas trengginas self-assigned this Sep 8, 2023
@sauwming
Copy link
Member

sauwming commented Oct 9, 2023

Closing this as this patch is not verified to be able to fix the problem.

@sauwming sauwming closed this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS and IPv6 problems (again)
2 participants