[PATCH 4/5] ntdll: Error out when trying to use a UDP-only option on a TCP socket
Zebediah Figura (she/her)
zfigura at codeweavers.com
Sun Aug 15 14:03:28 CDT 2021
On 8/15/21 1:58 PM, Alex Henrie wrote:
> On Fri, Aug 13, 2021 at 10:05 AM Zebediah Figura (she/her)
> <zfigura at codeweavers.com> wrote:
>>
>> Do these options not return EINVAL on a known system? What do they
>> return instead? At least the commit message, if not the code, should
>> mention this.
>
> These protocol+option combinations result in WSAEINVAL on every
> version of Windows from XP on; no need to mark any of them as BROKEN
> in the tests.
I mean on the host Unix system. If they already return EINVAL there's no
need to handle them specially.
>> On 8/13/21 12:56 AM, Alex Henrie wrote:
>>>
>>> diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
>>> index c1bbfe4d775..b6e6c53f3d3 100644
>>> --- a/dlls/ws2_32/socket.c
>>> +++ b/dlls/ws2_32/socket.c
>>> @@ -438,6 +438,7 @@ static DWORD NtStatusToWSAError( NTSTATUS status )
>>> {STATUS_ACCESS_VIOLATION, WSAEFAULT},
>>> {STATUS_PAGEFILE_QUOTA, WSAENOBUFS},
>>> {STATUS_INVALID_HANDLE, WSAENOTSOCK},
>>> + {STATUS_INVALID_PARAMETER, WSAEINVAL},
>>> {STATUS_NO_SUCH_DEVICE, WSAENETDOWN},
>>> {STATUS_NO_SUCH_FILE, WSAENETDOWN},
>>> {STATUS_NO_MEMORY, WSAENOBUFS},
>>>
>>
>> You don't need this hunk; all errors not otherwise translated are
>> converted to WSAEINVAL.
>
> Thanks for pointing that out; I will resend the patch without it. The
> first three patches in the series were good though, right?
>
> -Alex
>
More information about the wine-devel
mailing list