# HG changeset patch # User Bram Moolenaar # Date 1599845403 -7200 # Node ID a5bda73bc640d4ed8fffe5bf58d9800e1a4b9c2f # Parent dc7da37a0a7d7b318d5fc8328dea3080928edce1 patch 8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addresses Commit: https://github.com/vim/vim/commit/c6a67c92bcbf4ef09063814af0c65d3e0585ada0 Author: Bram Moolenaar Date: Fri Sep 11 19:28:19 2020 +0200 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) diff --git a/src/channel.c b/src/channel.c --- a/src/channel.c +++ b/src/channel.c @@ -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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1661, +/**/ 1660, /**/ 1659,