summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-11 19:28:19 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-11 19:28:19 +0200
commitc6a67c92bcbf4ef09063814af0c65d3e0585ada0 (patch)
tree18f83c1a956186d3928e772cbd5d4cca6b72423a
parentc0c71e9d9813f025c5fc1ce84eae309843395199 (diff)
downloadvim-git-c6a67c92bcbf4ef09063814af0c65d3e0585ada0.tar.gz
patch 8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addressesv8.2.1661
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)
-rw-r--r--src/channel.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/channel.c b/src/channel.c
index e73c41573..bdb59f0d3 100644
--- 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
index 47b1e568c..77f17f621 100644
--- 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,