Created
June 6, 2026 23:59
-
-
Save griffi-gh/f77f8649148db3028a0f6413b0c4dbb0 to your computer and use it in GitHub Desktop.
stub-ip-ecn.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c | |
| index 0aa4da73f..892f1f1d7 100644 | |
| --- a/dlls/ws2_32/socket.c | |
| +++ b/dlls/ws2_32/socket.c | |
| @@ -2233,6 +2233,9 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl | |
| } | |
| return server_getsockopt( s, IOCTL_AFD_WINE_GET_IP_RECVTOS, optval, optlen ); | |
| + case IP_ECN: | |
| + return 0; | |
| + | |
| case IP_RECVTTL: | |
| if (*optlen < sizeof(DWORD) || !optval) | |
| { | |
| @@ -2353,6 +2356,9 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl | |
| *optlen = 1; | |
| return server_getsockopt( s, IOCTL_AFD_WINE_GET_IPV6_V6ONLY, optval, optlen ); | |
| + case IPV6_ECN: | |
| + return 0; | |
| + | |
| default: | |
| FIXME( "unrecognized IPv6 option %u\n", optname ); | |
| /* fall through */ | |
| @@ -3702,6 +3708,14 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int | |
| } | |
| return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_RECVTOS, optval, optlen ); | |
| + case IP_ECN: | |
| + if (optlen < sizeof(DWORD) || !optval) | |
| + { | |
| + SetLastError( WSAEFAULT ); | |
| + return SOCKET_ERROR; | |
| + } | |
| + return 0; | |
| + | |
| case IP_RECVTTL: | |
| if (optlen < sizeof(DWORD) || !optval) | |
| { | |
| @@ -3840,6 +3854,14 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int | |
| value = *optval; | |
| return server_setsockopt( s, IOCTL_AFD_WINE_SET_IPV6_V6ONLY, (char *)&value, sizeof(value) ); | |
| + case IPV6_ECN: | |
| + if (optlen < sizeof(DWORD) || !optval) | |
| + { | |
| + SetLastError( WSAEFAULT ); | |
| + return SOCKET_ERROR; | |
| + } | |
| + return 0; | |
| + | |
| default: | |
| FIXME("Unknown IPPROTO_IPV6 optname 0x%08x\n", optname); | |
| SetLastError(WSAENOPROTOOPT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment