[PATCH 3/5] ws2_32: Drop support for getting the IP_HDRINCL socket option
Alex Henrie
alexhenrie24 at gmail.com
Fri Aug 13 00:56:15 CDT 2021
Windows only supports setting this option, not getting it.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/ntdll/unix/socket.c | 3 ---
dlls/ws2_32/socket.c | 3 ---
dlls/ws2_32/tests/sock.c | 12 ++++--------
include/wine/afd.h | 1 -
4 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 4f0c83597df..1ac4365c012 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -1762,9 +1762,6 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
return do_setsockopt( handle, io, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP, in_buffer, in_size );
#ifdef IP_HDRINCL
- case IOCTL_AFD_WINE_GET_IP_HDRINCL:
- return do_getsockopt( handle, io, IPPROTO_IP, IP_HDRINCL, out_buffer, out_size );
-
case IOCTL_AFD_WINE_SET_IP_HDRINCL:
return do_setsockopt( handle, io, IPPROTO_IP, IP_HDRINCL, in_buffer, in_size );
#endif
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 9a45124cd9e..c1bbfe4d775 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1677,9 +1677,6 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl
case IP_DONTFRAGMENT:
return server_getsockopt( s, IOCTL_AFD_WINE_GET_IP_DONTFRAGMENT, optval, optlen );
- case IP_HDRINCL:
- return server_getsockopt( s, IOCTL_AFD_WINE_GET_IP_HDRINCL, optval, optlen );
-
case IP_MULTICAST_IF:
return server_getsockopt( s, IOCTL_AFD_WINE_GET_IP_MULTICAST_IF, optval, optlen );
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 6693c469dce..7605a172fef 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1437,12 +1437,10 @@ todo_wine
k = 99;
SetLastError(0xdeadbeef);
err = getsockopt(s, IPPROTO_IP, IP_HDRINCL, (char *) &k, &size);
+ ok(err == -1, "Expected -1, got %d\n", err);
todo_wine
- {
- ok(err == -1, "Expected -1, got %d\n", err);
ok(GetLastError() == WSAEINVAL, "Expected 10022, got %d\n", GetLastError());
- ok(k == 99, "Expected 99, got %d\n", k);
- }
+ ok(k == 99, "Expected 99, got %d\n", k);
size = sizeof(k);
k = 0;
@@ -1453,12 +1451,10 @@ todo_wine
k = 99;
SetLastError(0xdeadbeef);
err = getsockopt(s, IPPROTO_IP, IP_HDRINCL, (char *) &k, &size);
+ ok(err == -1, "Expected -1, got %d\n", err);
todo_wine
- {
- ok(err == -1, "Expected -1, got %d\n", err);
ok(GetLastError() == WSAEINVAL, "Expected 10022, got %d\n", GetLastError());
- ok(k == 99, "Expected 99, got %d\n", k);
- }
+ ok(k == 99, "Expected 99, got %d\n", k);
}
else /* <= 2003 the tests differ between TCP and UDP, UDP silently accepts */
{
diff --git a/include/wine/afd.h b/include/wine/afd.h
index 49bbcccd3af..43e140c91c6 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -187,7 +187,6 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_SET_IP_DONTFRAGMENT WINE_AFD_IOC(243)
#define IOCTL_AFD_WINE_SET_IP_DROP_MEMBERSHIP WINE_AFD_IOC(244)
#define IOCTL_AFD_WINE_SET_IP_DROP_SOURCE_MEMBERSHIP WINE_AFD_IOC(245)
-#define IOCTL_AFD_WINE_GET_IP_HDRINCL WINE_AFD_IOC(246)
#define IOCTL_AFD_WINE_SET_IP_HDRINCL WINE_AFD_IOC(247)
#define IOCTL_AFD_WINE_GET_IP_MULTICAST_IF WINE_AFD_IOC(248)
#define IOCTL_AFD_WINE_SET_IP_MULTICAST_IF WINE_AFD_IOC(249)
--
2.32.0
More information about the wine-devel
mailing list