GNU bug report logs -
#23606
25.1.50; "localhost" vs. "127.0.0.1"
Previous Next
Reported by: Ken Brown <kbrown <at> cornell.edu>
Date: Mon, 23 May 2016 20:35:01 UTC
Severity: normal
Found in version 25.1.50
Done: Ken Brown <kbrown <at> cornell.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 5/24/2016 1:20 PM, Achim Gratz wrote:
> Ken Brown writes:
>> The test echo-server-nowait in test/lisp/net/network-stream-tests.el
>> fails on Cygwin, but it passes if I create the client process using
>> "127.0.0.1" instead of "localhost":
>
> This could be a case where it makes a difference if the IPv6 (::1) or
> IPv4 address is returned (first) for localhost. IIRC, Windows and
> up-to-date Linux prefer IPv6 by default. If so, it would likely be
> better to fix the parts of the code that assumes return of IPv4
> addresses only.
You're right. In the test in question, IPv4 is specified for the server but not for the client. The test passes on Cygwin if I specify IPv4 for the client also:
diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el
index c9b7cc7..f30c92a 100644
--- a/test/lisp/net/network-stream-tests.el
+++ b/test/lisp/net/network-stream-tests.el
@@ -145,6 +145,7 @@ server-process-filter
:buffer (generate-new-buffer "*foo*")
:host "localhost"
:nowait t
+ :family 'ipv4
:service port)))
(should (eq (process-status proc) 'connect))
(while (eq (process-status proc) 'connect)
Glenn, does this also fix the problem on RHEL 7.2?
Ken
This bug report was last modified 9 years and 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.