From: Juanma Barranquero Date: Sat, 25 Sep 2010 00:32:09 +0000 (+0200) Subject: Fix bug#6781: Use 127.0.0.1 for local hosts, not "localhost". X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~40 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba3033ee40a7e4bad9bf7df5a2fc06046b5df08a;p=emacs.git Fix bug#6781: Use 127.0.0.1 for local hosts, not "localhost". * lisp/server.el (server-start): Revert part of 2010-08-08 change. Using address 127.0.0.1 for local host is now done in Fmake_network_process. * src/process.c (Fmake_network_process): When arg :host is 'local, use address 127.0.0.1, not name "localhost". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df02432e79a..0af5f330232 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-09-25 Juanma Barranquero + + * server.el (server-start): Revert part of 2010-08-08 change. Using + address 127.0.0.1 for local host is now done in Fmake_network_process. + 2010-09-24 Glenn Morris * image-mode.el, progmodes/compile.el, progmodes/gud.el: diff --git a/lisp/server.el b/lisp/server.el index f0e88d03612..3a48efed7da 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -565,7 +565,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.") (if server-use-tcp (list :family 'ipv4 ;; We're not ready for IPv6 yet :service t - :host (or server-host "127.0.0.1") ;; See bug#6781 + :host (or server-host 'local) :plist '(:authenticated nil)) (list :family 'local :service server-file diff --git a/src/ChangeLog b/src/ChangeLog index 94ae1496921..8b29c804943 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-09-25 Juanma Barranquero + + * process.c (Fmake_network_process): When arg :host is 'local, + use address 127.0.0.1, not name "localhost". (Bug#6781) + 2010-09-24 Eli Zaretskii * indent.c (Fcurrent_indentation, indented_beyond_p) diff --git a/src/process.c b/src/process.c index ec1b9586db5..ac82f12debb 100644 --- a/src/process.c +++ b/src/process.c @@ -3170,7 +3170,9 @@ usage: (make-network-process &rest ARGS) */) if (!NILP (host)) { if (EQ (host, Qlocal)) - host = build_string ("localhost"); + /* 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"); CHECK_STRING (host); }