Subject: bug#14779: 24.3; Failure to resolve IPv6 addresses in make-network-process

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 23 Oct 2019 13:39:53 +0200

[email-masked] (Toke Høiland-Jørgensen) writes:

> I'm using ERC to connect to IRC, and was wondering why the connection
> used IPv4 rather than IPv6 when the server has both addresses
> configured. Messing with the DNS resolver so the address only resolves
> to IPv6 made Emacs unable to connect at all.
>
> Investigating this further, it seems that by default
> make-network-process does not resolve IPv6 addresses at all unless
> specifically asked to do so. More precisely, patch open-network-stream
> to pass :family 0 (line 143 of network-stream.el) makes resolution work
> as expected (i.e. first IPv6, then v4 if no v6 address exists), but the
> default of leaving out the :family parameter (or setting it to nil)
> makes resolution IPv4-only, resulting in a 'Name or service not known'
> error when trying to connect.

The code has changed substantially in the six years since this was
reported.

Are you still seeing these problems?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no