Signed-off-by: Zebediah Figura z.figura12@gmail.com --- include/wine/afd.h | 82 ++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 40 deletions(-)
diff --git a/include/wine/afd.h b/include/wine/afd.h index c672168bc6a..5db8fb1f4de 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -140,46 +140,48 @@ struct afd_get_events_params NTSTATUS status[13]; };
-#define IOCTL_AFD_WINE_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_CONNECT CTL_CODE(FILE_DEVICE_NETWORK, 203, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SHUTDOWN CTL_CODE(FILE_DEVICE_NETWORK, 204, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_RECVMSG CTL_CODE(FILE_DEVICE_NETWORK, 205, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SENDMSG CTL_CODE(FILE_DEVICE_NETWORK, 206, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_TRANSMIT CTL_CODE(FILE_DEVICE_NETWORK, 207, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 208, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_FIONBIO CTL_CODE(FILE_DEVICE_NETWORK, 209, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_COMPLETE_ASYNC CTL_CODE(FILE_DEVICE_NETWORK, 210, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_FIONREAD CTL_CODE(FILE_DEVICE_NETWORK, 211, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SIOCATMARK CTL_CODE(FILE_DEVICE_NETWORK, 212, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_INTERFACE_LIST CTL_CODE(FILE_DEVICE_NETWORK, 213, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_KEEPALIVE_VALS CTL_CODE(FILE_DEVICE_NETWORK, 214, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_MESSAGE_SELECT CTL_CODE(FILE_DEVICE_NETWORK, 215, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GETPEERNAME CTL_CODE(FILE_DEVICE_NETWORK, 216, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_INFO CTL_CODE(FILE_DEVICE_NETWORK, 218, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_ACCEPTCONN CTL_CODE(FILE_DEVICE_NETWORK, 219, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_BROADCAST CTL_CODE(FILE_DEVICE_NETWORK, 220, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_BROADCAST CTL_CODE(FILE_DEVICE_NETWORK, 221, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_ERROR CTL_CODE(FILE_DEVICE_NETWORK, 222, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_KEEPALIVE CTL_CODE(FILE_DEVICE_NETWORK, 223, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_KEEPALIVE CTL_CODE(FILE_DEVICE_NETWORK, 224, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_LINGER CTL_CODE(FILE_DEVICE_NETWORK, 225, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_LINGER CTL_CODE(FILE_DEVICE_NETWORK, 226, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_OOBINLINE CTL_CODE(FILE_DEVICE_NETWORK, 227, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_OOBINLINE CTL_CODE(FILE_DEVICE_NETWORK, 228, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_RCVBUF CTL_CODE(FILE_DEVICE_NETWORK, 229, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_RCVBUF CTL_CODE(FILE_DEVICE_NETWORK, 230, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_RCVTIMEO CTL_CODE(FILE_DEVICE_NETWORK, 231, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_RCVTIMEO CTL_CODE(FILE_DEVICE_NETWORK, 232, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_REUSEADDR CTL_CODE(FILE_DEVICE_NETWORK, 233, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_REUSEADDR CTL_CODE(FILE_DEVICE_NETWORK, 234, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_SNDBUF CTL_CODE(FILE_DEVICE_NETWORK, 235, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_SNDBUF CTL_CODE(FILE_DEVICE_NETWORK, 236, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_GET_SO_SNDTIMEO CTL_CODE(FILE_DEVICE_NETWORK, 237, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_SO_SNDTIMEO CTL_CODE(FILE_DEVICE_NETWORK, 238, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP CTL_CODE(FILE_DEVICE_NETWORK, 239, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define WINE_AFD_IOC(x) CTL_CODE(FILE_DEVICE_NETWORK, x, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_AFD_WINE_CREATE WINE_AFD_IOC(200) +#define IOCTL_AFD_WINE_ACCEPT WINE_AFD_IOC(201) +#define IOCTL_AFD_WINE_ACCEPT_INTO WINE_AFD_IOC(202) +#define IOCTL_AFD_WINE_CONNECT WINE_AFD_IOC(203) +#define IOCTL_AFD_WINE_SHUTDOWN WINE_AFD_IOC(204) +#define IOCTL_AFD_WINE_RECVMSG WINE_AFD_IOC(205) +#define IOCTL_AFD_WINE_SENDMSG WINE_AFD_IOC(206) +#define IOCTL_AFD_WINE_TRANSMIT WINE_AFD_IOC(207) +#define IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE WINE_AFD_IOC(208) +#define IOCTL_AFD_WINE_FIONBIO WINE_AFD_IOC(209) +#define IOCTL_AFD_WINE_COMPLETE_ASYNC WINE_AFD_IOC(210) +#define IOCTL_AFD_WINE_FIONREAD WINE_AFD_IOC(211) +#define IOCTL_AFD_WINE_SIOCATMARK WINE_AFD_IOC(212) +#define IOCTL_AFD_WINE_GET_INTERFACE_LIST WINE_AFD_IOC(213) +#define IOCTL_AFD_WINE_KEEPALIVE_VALS WINE_AFD_IOC(214) +#define IOCTL_AFD_WINE_MESSAGE_SELECT WINE_AFD_IOC(215) +#define IOCTL_AFD_WINE_GETPEERNAME WINE_AFD_IOC(216) +#define IOCTL_AFD_WINE_DEFER WINE_AFD_IOC(217) +#define IOCTL_AFD_WINE_GET_INFO WINE_AFD_IOC(218) +#define IOCTL_AFD_WINE_GET_SO_ACCEPTCONN WINE_AFD_IOC(219) +#define IOCTL_AFD_WINE_GET_SO_BROADCAST WINE_AFD_IOC(220) +#define IOCTL_AFD_WINE_SET_SO_BROADCAST WINE_AFD_IOC(221) +#define IOCTL_AFD_WINE_GET_SO_ERROR WINE_AFD_IOC(222) +#define IOCTL_AFD_WINE_GET_SO_KEEPALIVE WINE_AFD_IOC(223) +#define IOCTL_AFD_WINE_SET_SO_KEEPALIVE WINE_AFD_IOC(224) +#define IOCTL_AFD_WINE_GET_SO_LINGER WINE_AFD_IOC(225) +#define IOCTL_AFD_WINE_SET_SO_LINGER WINE_AFD_IOC(226) +#define IOCTL_AFD_WINE_GET_SO_OOBINLINE WINE_AFD_IOC(227) +#define IOCTL_AFD_WINE_SET_SO_OOBINLINE WINE_AFD_IOC(228) +#define IOCTL_AFD_WINE_SET_SO_RCVBUF WINE_AFD_IOC(229) +#define IOCTL_AFD_WINE_GET_SO_RCVBUF WINE_AFD_IOC(230) +#define IOCTL_AFD_WINE_SET_SO_RCVTIMEO WINE_AFD_IOC(231) +#define IOCTL_AFD_WINE_GET_SO_RCVTIMEO WINE_AFD_IOC(232) +#define IOCTL_AFD_WINE_GET_SO_REUSEADDR WINE_AFD_IOC(233) +#define IOCTL_AFD_WINE_SET_SO_REUSEADDR WINE_AFD_IOC(234) +#define IOCTL_AFD_WINE_SET_SO_SNDBUF WINE_AFD_IOC(235) +#define IOCTL_AFD_WINE_GET_SO_SNDBUF WINE_AFD_IOC(236) +#define IOCTL_AFD_WINE_GET_SO_SNDTIMEO WINE_AFD_IOC(237) +#define IOCTL_AFD_WINE_SET_SO_SNDTIMEO WINE_AFD_IOC(238) +#define IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP WINE_AFD_IOC(239)
struct afd_create_params {
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntdll/unix/socket.c | 3 +++ dlls/ws2_32/socket.c | 2 ++ include/wine/afd.h | 1 + 3 files changed, 6 insertions(+)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index f65feef763f..e9d275e1b41 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1678,6 +1678,9 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc case IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP: return do_setsockopt( handle, io, IPPROTO_IP, IP_ADD_MEMBERSHIP, in_buffer, in_size );
+ case IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP: + return do_setsockopt( handle, io, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, in_buffer, in_size ); + default: { if ((code >> 16) == FILE_DEVICE_NETWORK) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 87966545bb8..2ff18e3cd7d 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3628,6 +3628,8 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP, optval, optlen );
case WS_IP_ADD_SOURCE_MEMBERSHIP: + return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP, optval, optlen ); + case WS_IP_DROP_SOURCE_MEMBERSHIP: case WS_IP_BLOCK_SOURCE: case WS_IP_UNBLOCK_SOURCE: diff --git a/include/wine/afd.h b/include/wine/afd.h index 5db8fb1f4de..2e4123e3611 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -182,6 +182,7 @@ struct afd_get_events_params #define IOCTL_AFD_WINE_GET_SO_SNDTIMEO WINE_AFD_IOC(237) #define IOCTL_AFD_WINE_SET_SO_SNDTIMEO WINE_AFD_IOC(238) #define IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP WINE_AFD_IOC(239) +#define IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP WINE_AFD_IOC(240)
struct afd_create_params {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93471
Your paranoid android.
=== debiant2 (64 bit WoW report) ===
ntdll: wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntdll/unix/socket.c | 3 +++ dlls/ws2_32/socket.c | 4 +++- include/wine/afd.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index e9d275e1b41..8b140ce4930 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1681,6 +1681,9 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc case IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP: return do_setsockopt( handle, io, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, in_buffer, in_size );
+ case IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE: + return do_setsockopt( handle, io, IPPROTO_IP, IP_BLOCK_SOURCE, in_buffer, in_size ); + default: { if ((code >> 16) == FILE_DEVICE_NETWORK) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 2ff18e3cd7d..00b83d06478 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3630,8 +3630,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, case WS_IP_ADD_SOURCE_MEMBERSHIP: return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP, optval, optlen );
- case WS_IP_DROP_SOURCE_MEMBERSHIP: case WS_IP_BLOCK_SOURCE: + return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE, optval, optlen ); + + case WS_IP_DROP_SOURCE_MEMBERSHIP: case WS_IP_UNBLOCK_SOURCE: { WS_IP_MREQ_SOURCE* val = (void*)optval; diff --git a/include/wine/afd.h b/include/wine/afd.h index 2e4123e3611..4ed75067264 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -183,6 +183,7 @@ struct afd_get_events_params #define IOCTL_AFD_WINE_SET_SO_SNDTIMEO WINE_AFD_IOC(238) #define IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP WINE_AFD_IOC(239) #define IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP WINE_AFD_IOC(240) +#define IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE WINE_AFD_IOC(241)
struct afd_create_params {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93472
Your paranoid android.
=== debiant2 (32 bit report) ===
ws2_32: sock.c:5787: Test succeeded inside todo block: expected failure sock.c:5788: Test succeeded inside todo block: got error 64
=== debiant2 (64 bit WoW report) ===
ntdll: wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntdll/unix/socket.c | 33 +++++++++++++++++++++++++++++++++ dlls/ws2_32/socket.c | 5 +++-- include/wine/afd.h | 1 + 3 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 8b140ce4930..f9f701f734c 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1684,6 +1684,39 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc case IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE: return do_setsockopt( handle, io, IPPROTO_IP, IP_BLOCK_SOURCE, in_buffer, in_size );
+ case IOCTL_AFD_WINE_GET_IP_DONTFRAGMENT: + { + socklen_t len = out_size; + int ret; + + if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL ))) + return status; + +#ifdef IP_DONTFRAG + ret = getsockopt( fd, IPPROTO_IP, IP_DONTFRAG, out_buffer, &len ); +#elif defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT) + { + int value; + + len = sizeof(value); + ret = getsockopt( fd, IPPROTO_IP, IP_MTU_DISCOVER, &value, &len ); + if (!ret) *(DWORD *)out_buffer = (value != IP_PMTUDISC_DONT); + } +#else + { + static int once; + + if (!once++) + FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" ); + ret = 0; /* fake success */ + } +#endif + if (needs_close) close( fd ); + if (ret) return sock_errno_to_status( errno ); + io->Information = len; + return STATUS_SUCCESS; + } + default: { if ((code >> 16) == FILE_DEVICE_NETWORK) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 00b83d06478..963d55ead2c 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2433,6 +2433,9 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, case WS_IPPROTO_IP: switch(optname) { + case WS_IP_DONTFRAGMENT: + return server_getsockopt( s, IOCTL_AFD_WINE_GET_IP_DONTFRAGMENT, optval, optlen ); + #ifdef IP_HDRINCL case WS_IP_HDRINCL: #endif @@ -2458,8 +2461,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, } release_sock_fd( s, fd ); return ret; - case WS_IP_DONTFRAGMENT: - return get_dont_fragment(s, IPPROTO_IP, (BOOL *)optval) ? 0 : SOCKET_ERROR;
default: FIXME( "unrecognized IP option %u\n", optname ); diff --git a/include/wine/afd.h b/include/wine/afd.h index 4ed75067264..13ede0d2450 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -184,6 +184,7 @@ struct afd_get_events_params #define IOCTL_AFD_WINE_SET_IP_ADD_MEMBERSHIP WINE_AFD_IOC(239) #define IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP WINE_AFD_IOC(240) #define IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE WINE_AFD_IOC(241) +#define IOCTL_AFD_WINE_GET_IP_DONTFRAGMENT WINE_AFD_IOC(242)
struct afd_create_params {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93473
Your paranoid android.
=== debiant2 (64 bit WoW report) ===
ntdll: wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntdll/unix/socket.c | 19 +++++++++++++++++++ dlls/ws2_32/socket.c | 6 ++++-- include/wine/afd.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index f9f701f734c..3f2dfe7c1f2 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1717,6 +1717,25 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc return STATUS_SUCCESS; }
+ case IOCTL_AFD_WINE_SET_IP_DONTFRAGMENT: +#ifdef IP_DONTFRAG + return do_setsockopt( handle, io, IPPROTO_IP, IP_DONTFRAG, in_buffer, in_size ); +#elif defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO) && defined(IP_PMTUDISC_DONT) + { + int value = *(DWORD *)in_buffer ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; + + return do_setsockopt( handle, io, IPPROTO_IP, IP_MTU_DISCOVER, &value, sizeof(value) ); + } +#else + { + static int once; + + if (!once++) + FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" ); + return STATUS_SUCCESS; /* fake success */ + } +#endif + default: { if ((code >> 16) == FILE_DEVICE_NETWORK) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 963d55ead2c..10e79d3f8ff 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3634,6 +3634,9 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, case WS_IP_BLOCK_SOURCE: return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE, optval, optlen );
+ case WS_IP_DONTFRAGMENT: + return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_DONTFRAGMENT, optval, optlen ); + case WS_IP_DROP_SOURCE_MEMBERSHIP: case WS_IP_UNBLOCK_SOURCE: { @@ -3666,8 +3669,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, #endif convert_sockopt(&level, &optname); break; - case WS_IP_DONTFRAGMENT: - return set_dont_fragment(s, IPPROTO_IP, *(BOOL *)optval) ? 0 : SOCKET_ERROR; + default: FIXME("Unknown IPPROTO_IP optname 0x%08x\n", optname); return SOCKET_ERROR; diff --git a/include/wine/afd.h b/include/wine/afd.h index 13ede0d2450..5b4114f4d77 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -185,6 +185,7 @@ struct afd_get_events_params #define IOCTL_AFD_WINE_SET_IP_ADD_SOURCE_MEMBERSHIP WINE_AFD_IOC(240) #define IOCTL_AFD_WINE_SET_IP_BLOCK_SOURCE WINE_AFD_IOC(241) #define IOCTL_AFD_WINE_GET_IP_DONTFRAGMENT WINE_AFD_IOC(242) +#define IOCTL_AFD_WINE_SET_IP_DONTFRAGMENT WINE_AFD_IOC(243)
struct afd_create_params {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93474
Your paranoid android.
=== debiant2 (64 bit WoW report) ===
ntdll: wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity wow64.c:513: Test failed: wrong status c0000001 wow64.c:514: Test failed: len set 3735928559 wow64.c:522: Test failed: wrong limit fffff wow64.c:529: Test failed: wrong granularity