[Bug 20433] Earth Eternal cannot connect, creates flood of DNS requests

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Oct 23 10:58:27 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=20433





--- Comment #7 from Ramon Cahenzli <ramon.cahenzli at gmail.com>  2009-10-23 10:58:26 ---
Earth Eternal forum user akoshka has identified a problem either in WINE, in
Earth Eternal or in Microsoft's documentation for inet_addr().

The rest of this comment is a quote from akoshka's posting, and a patch to
socket.c is attached to the bug:


After running Wine with the additional WINEDEBUG option 'relay', I noticed
there some suspicious differences :-

Run1 - Using the hostname

(see attached "run_using_hostname.txt")


Run2 - Using the IP address

(see attached "run_using_ip.txt")

There are two differences there. First off the value 0xffffffff is returned
from ws2_32.inet_addr when using a hostname in the URL, yet something that
looks more like a 4 byte IP address is returned when the IP address URL is
used.

So, I checked the MSDN documentation for inet_addr. It appears that this call
is supposed by used to resolve IP addresses (not hostnames) to a 4 byte
unsigned long. 

The documentation does not suggest that fully qualified hostnames should be
used. Yet, it appears thats exactly what spark player is doing.

So I hacked around in the WS_inet_addr function, again in socket.c. I've added
a hack to attempt to resolve as a hostname as well. If that works, then the 4
byte unsigned long of that hosts address is returned instead.

Fired up the client using the hostname URL, and it worked straight off!!!



More information about the wine-bugs mailing list