Commit 36d63105 authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

ws2_32: Change back magic 127.12.34.56 to loopback on connect().

parent 9d566032
......@@ -1492,6 +1492,19 @@ int WINAPI WS_connect(SOCKET s, const struct WS_sockaddr* name, int namelen)
}
else
{
if (name->sa_family == WS_AF_INET)
{
struct sockaddr_in *in4 = (struct sockaddr_in*) &uaddr;
if (memcmp(&in4->sin_addr, &magic_loopback_addr, 4) == 0)
{
/* Trying to connect to magic replace-loopback address,
* assuming we really want to connect to localhost */
TRACE("Trying to connect to magic IP address, using "
"INADDR_LOOPBACK instead.\n");
in4->sin_addr.s_addr = htonl(WS_INADDR_LOOPBACK);
}
}
if (connect(fd, &uaddr.addr, uaddrlen) == 0)
goto connect_success;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment