changeset 110556:310fef3bdbbb

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".
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 25 Sep 2010 02:32:09 +0200
parents e07971bb896c
children 04685072582d
files lisp/ChangeLog lisp/server.el src/ChangeLog src/process.c
diffstat 4 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 24 22:33:34 2010 +0000
+++ b/lisp/ChangeLog	Sat Sep 25 02:32:09 2010 +0200
@@ -1,3 +1,8 @@
+2010-09-25  Juanma Barranquero  <lekktu@gmail.com>
+
+	* 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  <rgm@gnu.org>
 
 	* image-mode.el, progmodes/compile.el, progmodes/gud.el:
--- a/lisp/server.el	Fri Sep 24 22:33:34 2010 +0000
+++ b/lisp/server.el	Sat Sep 25 02:32:09 2010 +0200
@@ -565,7 +565,7 @@
 		       (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
--- a/src/ChangeLog	Fri Sep 24 22:33:34 2010 +0000
+++ b/src/ChangeLog	Sat Sep 25 02:32:09 2010 +0200
@@ -1,3 +1,8 @@
+2010-09-25  Juanma Barranquero  <lekktu@gmail.com>
+
+	* 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  <eliz@gnu.org>
 
 	* indent.c (Fcurrent_indentation, indented_beyond_p)
--- a/src/process.c	Fri Sep 24 22:33:34 2010 +0000
+++ b/src/process.c	Sat Sep 25 02:32:09 2010 +0200
@@ -3170,7 +3170,9 @@
   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);
     }