Zebediah Figura : ws2_32: Move the setsockopt(IP_UNICAST_IF) implementation to ntdll.
Alexandre Julliard
julliard at winehq.org
Tue Jul 27 15:51:00 CDT 2021
Module: wine
Branch: master
Commit: a06bcd03b98dfd82bdc4a72508c8ef6b29634468
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a06bcd03b98dfd82bdc4a72508c8ef6b29634468
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Jul 27 00:13:35 2021 -0500
ws2_32: Move the setsockopt(IP_UNICAST_IF) implementation to ntdll.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/socket.c | 3 +++
dlls/ws2_32/socket.c | 5 +----
include/wine/afd.h | 1 +
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 0269c2b78ae..f33fc014f3b 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -1797,6 +1797,9 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
#ifdef IP_UNICAST_IF
case IOCTL_AFD_WINE_GET_IP_UNICAST_IF:
return do_getsockopt( handle, io, IPPROTO_IP, IP_UNICAST_IF, out_buffer, out_size );
+
+ case IOCTL_AFD_WINE_SET_IP_UNICAST_IF:
+ return do_setsockopt( handle, io, IPPROTO_IP, IP_UNICAST_IF, in_buffer, in_size );
#endif
default:
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index f94558520af..d5de709e991 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -3705,11 +3705,8 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
case WS_IP_UNBLOCK_SOURCE:
return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_UNBLOCK_SOURCE, optval, optlen );
-#ifdef IP_UNICAST_IF
case WS_IP_UNICAST_IF:
-#endif
- convert_sockopt(&level, &optname);
- break;
+ return server_setsockopt( s, IOCTL_AFD_WINE_SET_IP_UNICAST_IF, optval, optlen );
default:
FIXME("Unknown IPPROTO_IP optname 0x%08x\n", optname);
diff --git a/include/wine/afd.h b/include/wine/afd.h
index 18e53706fee..c150e2ce474 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -206,6 +206,7 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_SET_IP_TTL WINE_AFD_IOC(261)
#define IOCTL_AFD_WINE_SET_IP_UNBLOCK_SOURCE WINE_AFD_IOC(262)
#define IOCTL_AFD_WINE_GET_IP_UNICAST_IF WINE_AFD_IOC(263)
+#define IOCTL_AFD_WINE_SET_IP_UNICAST_IF WINE_AFD_IOC(264)
struct afd_create_params
{
More information about the wine-cvs
mailing list