From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: toke@toke.dk (Toke =?UTF-8?Q?H=C3=B8iland-J=C3=B8rgensen?=) Newsgroups: gmane.emacs.bugs Subject: bug#14779: 24.3; Failure to resolve IPv6 addresses in make-network-process Date: Wed, 03 Jul 2013 15:33:50 +0200 Message-ID: <87d2qzzs1t.fsf@toke.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372866202 14292 80.91.229.3 (3 Jul 2013 15:43:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2013 15:43:22 +0000 (UTC) To: 14779@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 03 17:43:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UuPDB-00074t-SL for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2013 17:43:18 +0200 Original-Received: from localhost ([::1]:57746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuPDB-0006Ih-H8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2013 11:43:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuPD2-0006Eu-Ns for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 11:43:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuPCz-0003P1-7k for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 11:43:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuPCz-0003Ow-5D for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 11:43:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UuPCy-0001SF-QV for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 11:43:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: toke@toke.dk (Toke =?UTF-8?Q?H=C3=B8iland-J=C3=B8rgensen?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2013 15:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14779 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13728661605499 (code B ref -1); Wed, 03 Jul 2013 15:43:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jul 2013 15:42:40 +0000 Original-Received: from localhost ([127.0.0.1]:55006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuPCY-0001Qa-Ui for submit@debbugs.gnu.org; Wed, 03 Jul 2013 11:42:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuNU6-0005GY-5h for submit@debbugs.gnu.org; Wed, 03 Jul 2013 09:52:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuNTw-0004Pg-1O for submit@debbugs.gnu.org; Wed, 03 Jul 2013 09:52:32 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNTv-0004PV-TJ for submit@debbugs.gnu.org; Wed, 03 Jul 2013 09:52:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNTp-0005sB-Us for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 09:52:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuNBx-0005Q9-Ij for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 09:34:00 -0400 Original-Received: from mail.tohojo.dk ([188.40.53.186]:51097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuNBx-0005Ph-7c for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 09:33:53 -0400 Original-Received: from alrua-desktop.borgediget.toke.dk (unknown [10.42.3.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tohojo.dk (Postfix) with ESMTPSA id D57851EC1EF0 for ; Wed, 3 Jul 2013 15:33:50 +0200 (CEST) Original-Received: by alrua-desktop.borgediget.toke.dk (Postfix, from userid 1000) id 27EDA103ED; Wed, 3 Jul 2013 15:33:50 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 03 Jul 2013 11:42:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75853 Archived-At: 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)