Skip to content

Commit

Permalink
patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag
Browse files Browse the repository at this point in the history
Problem: Android not handling AI_V4MAPPED ai_flag
Solution: don't set AI_V4MAPPED flag when on Android, since
          Android's getaddrinfo returns EAI_BADFLAGS if ai_flags
          contains it

closes: #12613

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: cions <gh.cions@gmail.com>
  • Loading branch information
cions authored and chrisbra committed Aug 11, 2023
1 parent 7b7b4cb commit db4fd29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,9 @@ channel_open(
CLEAR_FIELD(hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
# if defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
# if defined(__ANDROID__)
hints.ai_flags = AI_ADDRCONFIG;
# elif defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
# endif
// Set port number manually in order to prevent name resolution services
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1692,
/**/
1691,
/**/
Expand Down

0 comments on commit db4fd29

Please sign in to comment.