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 #8 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: Fri, 25 Jan 2019 15:04:38 +0100
Ernesto Alfonso <erjoalgo <at> gmail.com> writes:

>     $ netstat -tlpn | grep 1959
>     tcp6       0      0 ::1:1959                :::*                    LISTEN      1990/stumpwm        
>
>
>     ELISP> (make-network-process :host 'local
>                                  :service 1959
>                                  :name "test")
>     *** Eval error ***  make client process failed: Connection
>     refused, :host, local, :service, 1959, :name, test

Here emacs tries an AF_UNSPEC connection to 127.0.0.1

>     ELISP> (make-network-process :host 'local
>                                  :service 1959
>                                  :name "test"
>                                  :family 'ipv6)
>     *** Eval error ***  127.0.0.1/1959 Address family for hostname
>                                  not supported

Here it tries an AF_INET6 connection to 127.0.0.1, which obviously isnʼt
going to work. Itʼs a deliberate choice based on 
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6781>

>     ELISP> (make-network-process :host "localhost"
>                                  :service 1959
>                                  :name "test")
>     #<process test>

And here we use AF_UNSPEC, and loop through whatever getaddrinfo
returns, so your IPv6 "localhost" works.

I guess if we make a change so that :host 'local means the same as
:host "localhost", your use case will work, but I worry about what
else that would break (and itʼs the opposite of bug#6781). Perhaps the
minimal change would be to use "::1" when specifying :family 'ipv6?

Robert




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.