mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 17:14:06 +00:00
server: Always update cached socket name after connect.
Fixes a regression introduced by
5c009c17b3
.
For IPV6 socket already bound with bind() with IPV6_V6ONLY set to 0
the address returned by getsockname() may change after it is connected
to a IPV4 peer (e. g., from :: to ::ffff:192.0.2.128).
The effect of blamed commit is that before that Unix getsockname()
was called for each ws2_32 getsockname() and after the commit the
socket name is cached at bind and connect.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9da1a5059d
commit
4c1a288f63
|
@ -2340,7 +2340,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
|
|||
allow_fd_caching( sock->fd );
|
||||
|
||||
unix_len = sizeof(unix_addr);
|
||||
if (!sock->bound && !getsockname( unix_fd, &unix_addr.addr, &unix_len ))
|
||||
if (!getsockname( unix_fd, &unix_addr.addr, &unix_len ))
|
||||
sock->addr_len = sockaddr_from_unix( &unix_addr, &sock->addr.addr, sizeof(sock->addr) );
|
||||
sock->bound = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue