unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: toke@toke.dk (Toke Høiland-Jørgensen)
To: 14779@debbugs.gnu.org
Subject: bug#14779: 24.3; Failure to resolve IPv6 addresses in make-network-process
Date: Wed, 03 Jul 2013 15:33:50 +0200	[thread overview]
Message-ID: <87d2qzzs1t.fsf@toke.dk> (raw)

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.

Perusing the source code of process.c, it seems to me that it *should*
do the right thing, when :family is nil, and I can't figure out why it's
not.

I have installed Emacs from the binary packages provided by my
distribution (Arch linux).

Regards,
-Toke


In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.1)
 of 2013-04-29 on eric
Windowing system distributor `The X.Org Foundation', version 11.0.11402000
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
 --param=ssp-buffer-size=4'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_MESSAGES: en_GB.UTF-8
  value of $LANG: da_DK.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: ERC

Features:
(shadow bbdb-message mail-extr emacsbug message idna rfc822 mml mml-sec
mm-decode mm-bodies mm-encode gmm-utils mailheader sendmail mail-utils
misearch multi-isearch gnutls network-stream starttls erc-menu erc-join
erc-ring erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp
erc-netsplit autoinsert eieio-opt helm-misc helm-files image-dired ffap
helm-tags helm-bookmark helm-adaptative helm-info helm-net browse-url
helm-plugin bookmark helm-locate helm-help helm-match-plugin
helm-external helm-buffers helm-grep helm-regexp grep helm-elscreen
helm-utils helm find-file-in-repository-autoloads flymake-lua-autoloads
lua-mode-autoloads sauron-autoloads yaml-mode-autoloads package xcscope
helm-config sunrise-x-loop sunrise-commander recentf tree-widget
wid-edit sort hl-line find-dired esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg eldoc esh-groups eshell esh-util esh-module esh-mode
enriched dired-x dired-aux desktop preview-latex tex-site auto-loads
undo-tree autopair browse-kill-ring iedit gnus-article-treat-patch
gnus-dired dired magit-bisect magit-key-mode magit epa epg epg-config
diff-mode uniquify auto-complete-config auto-complete popup pydoc-info
info-look info python-mode rx cc-cmds compile ropemacs pymacs cc-styles
cc-align cc-engine cc-vars cc-defs bbdb-mua bbdb-vcard bbdb-com crm
mailabbrev vcard bbdb timezone bbdb-loaddefs znc erc-services
erc-networks erc-spelling flyspell ispell erc-goodies erc erc-backend
erc-compat thingatpt pp notify dbus w3m-load multi-term term disp-table
ehelp electric post ox-beamer org-caldav icalendar diary-lib
diary-loaddefs org-id ox-latex ox-icalendar ox-html ox-ascii ox-publish
ox org-element url-http tls url url-proxy url-privacy url-expand
url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047
rfc2045 ietf-drums url-cookie url-domsuf url-gw url-dav url-handlers
url-util url-parse url-vars xml org-protocol org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs
solarized-dark-theme solarized-definitions ido autorevert alist pym
static apel-ver product jka-compr protbuf tramp tramp-compat auth-source
eieio warnings byte-opt bytecomp byte-compile cconv inversion gnus-util
mm-util mail-prsvr password-cache tramp-loaddefs shell pcomplete comint
ansi-color format-spec nxhtml-autostart nxhtml-autoload majmodpri vc-git
nxhtml-menu web-autoload nxhtml-base wc yasnippet help-mode skeleton
paren cus-start cus-load log-edit ring pcvs-util add-log server
zencoding-mode ebib derived advice advice-preload help-fns cl-macs gv
bibtex easymenu cl cl-lib edmacro kmacro gnus-load easy-mmode time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)





             reply	other threads:[~2013-07-03 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 13:33 Toke Høiland-Jørgensen [this message]
2013-07-03 16:41 ` bug#14779: 24.3; Failure to resolve IPv6 addresses in make-network-process Andreas Schwab
2013-07-03 16:51   ` Toke Høiland-Jørgensen
2013-07-03 20:04     ` Andreas Schwab
2013-07-03 20:22       ` Toke Høiland-Jørgensen
2019-10-23 11:39 ` Lars Ingebrigtsen
2019-10-23 12:24   ` Unknown
2019-10-24 11:45     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87d2qzzs1t.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=14779@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).