* net.cc (socketpair): Bind first socket to loopback only as well.

This commit is contained in:
Corinna Vinschen 2011-10-05 06:18:16 +00:00
parent 5be9bb15b2
commit a06c3bf336
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-10-04 Corinna Vinschen <corinna@vinschen.de>
* net.cc (socketpair): Bind first socket to loopback only as well.
2011-09-21 Christopher Faylor <me.cygwin2011@cgf.cx>
* tty.cc (grantpt): Check for valid fd.

View File

@ -2630,7 +2630,7 @@ socketpair (int family, int type, int protocol, int *sb)
/* bind the socket to any unused port */
sock_in.sin_family = AF_INET;
sock_in.sin_port = 0;
sock_in.sin_addr.s_addr = INADDR_ANY;
sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
if (bind (newsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
{
debug_printf ("bind failed");