0
0
mirror of https://github.com/vim/vim.git synced 2025-08-31 20:53:42 -04:00

patch 8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addresses

Problem:    Cannot connect to 127.0.0.1 for host with only IPv6 addresses.
Solution:   pass AI_V4MAPPED flag to getaddrinfo. (Filipe Brandenburger,
            closes #6931)
This commit is contained in:
Bram Moolenaar 2020-09-11 19:28:19 +02:00
parent c0c71e9d98
commit c6a67c92bc
2 changed files with 4 additions and 2 deletions

View File

@ -977,8 +977,8 @@ channel_open(
CLEAR_FIELD(hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
# ifdef AI_ADDRCONFIG
hints.ai_flags = AI_ADDRCONFIG;
# if 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
// from being invoked in the environment where AI_NUMERICSERV is not

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1661,
/**/
1660,
/**/