GNU bug report logs - #34193
26.1; make-network-proces :host 'local fails with ipv6

Previous Next

Package: emacs;

Reported by: Ernesto Alfonso <erjoalgo <at> gmail.com>

Date: Fri, 25 Jan 2019 03:27:02 UTC

Severity: normal

Tags: fixed

Found in version 26.1

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 34193 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Ernesto Alfonso <erjoalgo <at> gmail.com>
Cc: 34193 <at> debbugs.gnu.org
Subject: Re: bug#34193: 26.1; make-network-proces :host 'local fails with ipv6
Date: Sat, 26 Jan 2019 12:04:56 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> Perhaps the minimal change would be to use "::1" when specifying
> :family 'ipv6?

That would be this patch, which fixes this particular use case, and
shouldn't break anything else.

diff --git i/src/process.c w/src/process.c
index c0741403b5..72351db3e6 100644
--- i/src/process.c
+++ w/src/process.c
@@ -3983,14 +3983,24 @@ usage: (make-network-process &rest ARGS)  */)
 #ifdef HAVE_LOCAL_SOCKETS
       if (family != AF_LOCAL)
 #endif
-	host = build_string ("127.0.0.1");
+        {
+        if (family == AF_INET6)
+          host = build_string ("::1");
+        else
+          host = build_string ("127.0.0.1");
+        }
     }
   else
     {
       if (EQ (host, Qlocal))
+        {
 	/* Depending on setup, "localhost" may map to different IPv4 and/or
 	   IPv6 addresses, so it's better to be explicit (Bug#6781).  */
-	host = build_string ("127.0.0.1");
+        if (family == AF_INET6)
+          host = build_string ("::1");
+        else
+          host = build_string ("127.0.0.1");
+        }
       CHECK_STRING (host);
     }
 






This bug report was last modified 6 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.