all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ernesto Alfonso <erjoalgo@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: 34193@debbugs.gnu.org
Subject: bug#34193: 26.1; make-network-proces :host 'local fails with ipv6
Date: Sat, 26 Jan 2019 03:06:12 -0800	[thread overview]
Message-ID: <CAOckuXAGEBiqbnqsYP0EV0+YihNstSXWy+NS3Jv01HcRwbBecw@mail.gmail.com> (raw)
In-Reply-To: <m2munnr86f.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

Thanks for looking into this.

Ernesto

On Sat, Jan 26, 2019, 3:04 AM Robert Pluim <rpluim@gmail.com wrote:

> Robert Pluim <rpluim@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);
>      }
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1988 bytes --]

  reply	other threads:[~2019-01-26 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  3:26 bug#34193: 26.1; make-network-proces :host 'local fails with ipv6 Ernesto Alfonso
2019-01-25 14:04 ` Robert Pluim
2019-01-26 11:04   ` Robert Pluim
2019-01-26 11:06     ` Ernesto Alfonso [this message]
2019-01-30  9:13       ` Robert Pluim
2019-01-30 19:47         ` Alan Third
2019-02-04  9:40           ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOckuXAGEBiqbnqsYP0EV0+YihNstSXWy+NS3Jv01HcRwbBecw@mail.gmail.com \
    --to=erjoalgo@gmail.com \
    --cc=34193@debbugs.gnu.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.