ws2_32: Translate SIO_ADDRESS_LIST_CHANGE into a proper NT ioctl.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-09-24 22:21:01 -05:00 committed by Alexandre Julliard
parent 8fb897a571
commit c6806e3f20
3 changed files with 8 additions and 1 deletions

View File

@ -5164,6 +5164,10 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
case 0x667e: /* Netscape tries hard to use bogus ioctl 0x667e */
SetLastError(WSAEOPNOTSUPP);
return SOCKET_ERROR;
case WS_SIO_ADDRESS_LIST_CHANGE:
code = IOCTL_AFD_ADDRESS_LIST_CHANGE;
status = WSAEOPNOTSUPP;
break;
default:
status = WSAEOPNOTSUPP;
break;

View File

@ -25,6 +25,8 @@
#define IOCTL_AFD_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
struct afd_create_params
{
int family, type, protocol;

View File

@ -562,7 +562,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
case WS_SIO_ADDRESS_LIST_CHANGE:
case IOCTL_AFD_ADDRESS_LIST_CHANGE:
if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async ))
{
set_win32_error( WSAEWOULDBLOCK );
@ -572,6 +572,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
queue_async( &sock->ifchange_q, async );
set_error( STATUS_PENDING );
return 1;
default:
set_error( STATUS_NOT_SUPPORTED );
return 0;