Added patch to ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo.

This commit is contained in:
Sebastian Lackner
2015-11-29 18:10:07 +01:00
parent b14f029f04
commit e60b8d144b
6 changed files with 63 additions and 2 deletions

View File

@@ -342,6 +342,7 @@ patch_enable_all ()
enable_ws2_32_WSACleanup="$1"
enable_ws2_32_WSAPoll="$1"
enable_ws2_32_WriteWatches="$1"
enable_ws2_32_getaddrinfo="$1"
enable_wtsapi32_EnumerateProcesses="$1"
}
@@ -1138,6 +1139,9 @@ patch_enable ()
ws2_32-WriteWatches)
enable_ws2_32_WriteWatches="$2"
;;
ws2_32-getaddrinfo)
enable_ws2_32_getaddrinfo="$2"
;;
wtsapi32-EnumerateProcesses)
enable_wtsapi32_EnumerateProcesses="$2"
;;
@@ -6720,6 +6724,18 @@ if test "$enable_ws2_32_WSAPoll" -eq 1; then
) >> "$patchlist"
fi
# Patchset ws2_32-getaddrinfo
# |
# | Modified files:
# | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c
# |
if test "$enable_ws2_32_getaddrinfo" -eq 1; then
patch_apply ws2_32-getaddrinfo/0001-ws2_32-Ignore-socket-type-for-protocol-IPPROTO_IPV6-.patch
(
echo '+ { "Michael Müller", "ws2_32: Ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo.", 1 },';
) >> "$patchlist"
fi
# Patchset wtsapi32-EnumerateProcesses
# |
# | This patchset fixes the following Wine bugs:

View File

@@ -1 +1 @@
Fixes: [12332] Check handle type for HSPFILEQ handles
Fixes: [!12332] Check handle type for HSPFILEQ handles

View File

@@ -0,0 +1,42 @@
From 679f2b6acf543950bc657a981ee4696daa10a718 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 29 Nov 2015 17:48:57 +0100
Subject: ws2_32: Ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo.
---
dlls/ws2_32/socket.c | 6 ++++++
dlls/ws2_32/tests/sock.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index d31f0b4..342aa07 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -6358,6 +6358,12 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
else if (IS_IPX_PROTO(punixhints->ai_protocol) && punixhints->ai_socktype != SOCK_DGRAM)
punixhints->ai_socktype = 0;
+
+ else if (punixhints->ai_protocol == IPPROTO_IPV6)
+ {
+ punixhints->ai_family = AF_INET6;
+ punixhints->ai_protocol = 0;
+ }
}
/* getaddrinfo(3) is thread safe, no need to wrap in CS */
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 00fac77..bffc6b9 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -192,6 +192,7 @@ static const struct addr_hint_tests
{AF_UNSPEC, SOCK_STREAM, 999, 0 },
{AF_INET, SOCK_DGRAM, 999, 0 },
{AF_INET, SOCK_DGRAM, 999, 0 },
+ {AF_UNSPEC, SOCK_STREAM, IPPROTO_IPV6,0 },
};
/**************** Static variables ***************/
--
2.6.2

View File

@@ -0,0 +1 @@
Fixes: Ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo