ws2_32: Return WSAEFAULT from setsockopt() for IP_MULTICAST_LOOP with zero optlen.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
da745fee16
commit
c593b2f48e
|
@ -2981,6 +2981,11 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
|
||||||
return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_MULTICAST_IF, optval, optlen );
|
return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_MULTICAST_IF, optval, optlen );
|
||||||
|
|
||||||
case IP_MULTICAST_LOOP:
|
case IP_MULTICAST_LOOP:
|
||||||
|
if (!optlen)
|
||||||
|
{
|
||||||
|
SetLastError( WSAEFAULT );
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_MULTICAST_LOOP, optval, optlen );
|
return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_MULTICAST_LOOP, optval, optlen );
|
||||||
|
|
||||||
case IP_MULTICAST_TTL:
|
case IP_MULTICAST_TTL:
|
||||||
|
|
Loading…
Reference in New Issue