]> granicus.if.org Git - vim/commitdiff
patch 8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addresses v8.2.1661
authorBram Moolenaar <Bram@vim.org>
Fri, 11 Sep 2020 17:28:19 +0000 (19:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 11 Sep 2020 17:28:19 +0000 (19:28 +0200)
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)

src/channel.c
src/version.c

index e73c415732600603ee33f7838be6ce1412ab1607..bdb59f0d39c302881c1945eb2b6de59226b39d81 100644 (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
index 47b1e568c39cb9151b5255899c3356de906a5c11..77f17f621458dcc2d64d919edb06d881590255fa 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1661,
 /**/
     1660,
 /**/