server: Map ENODEV to STATUS_INVALID_ADDRESS_COMPONENT.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b257ed63f
commit
06dd08ee44
|
@ -10674,8 +10674,10 @@ static void test_bind(void)
|
|||
addr6.sin6_scope_id = 0xabacab;
|
||||
ret = bind(s, (struct sockaddr *)&addr6, sizeof(addr6));
|
||||
todo_wine_if (!((const struct sockaddr_in6 *)unicast_addr->Address.lpSockaddr)->sin6_scope_id)
|
||||
{
|
||||
ok(ret == -1, "expected failure\n");
|
||||
todo_wine ok(WSAGetLastError() == WSAEADDRNOTAVAIL, "got error %u\n", WSAGetLastError());
|
||||
ok(WSAGetLastError() == WSAEADDRNOTAVAIL, "got error %u\n", WSAGetLastError());
|
||||
}
|
||||
|
||||
addr6.sin6_scope_id = 0;
|
||||
ret = bind(s, (struct sockaddr *)&addr6, sizeof(addr6));
|
||||
|
|
|
@ -1976,6 +1976,9 @@ static int sock_get_ntstatus( int err )
|
|||
case ENOPROTOOPT: return STATUS_INVALID_PARAMETER;
|
||||
case EOPNOTSUPP: return STATUS_NOT_SUPPORTED;
|
||||
case EADDRINUSE: return STATUS_SHARING_VIOLATION;
|
||||
/* Linux returns ENODEV when specifying an invalid sin6_scope_id;
|
||||
* Windows returns STATUS_INVALID_ADDRESS_COMPONENT */
|
||||
case ENODEV:
|
||||
case EADDRNOTAVAIL: return STATUS_INVALID_ADDRESS_COMPONENT;
|
||||
case ECONNREFUSED: return STATUS_CONNECTION_REFUSED;
|
||||
case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED;
|
||||
|
|
Loading…
Reference in New Issue