ws2_32: Change back magic 127.12.34.56 to loopback on connect().
This commit is contained in:
parent
9d566032bb
commit
36d6310599
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue