Fix bug#6781: Use 127.0.0.1 for local hosts, not "localhost".
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 25 Sep 2010 00:32:09 +0000 (02:32 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 25 Sep 2010 00:32:09 +0000 (02:32 +0200)
* 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".

lisp/ChangeLog
lisp/server.el
src/ChangeLog
src/process.c

index df02432..0af5f33 100644 (file)
@@ -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:
index f0e88d0..3a48efe 100644 (file)
@@ -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
index 94ae149..8b29c80 100644 (file)
@@ -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)
index ec1b958..ac82f12 100644 (file)
@@ -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);
     }