win: get rid of early ipv6 support detection

No longer explictly check wheter an IPv6 stack is present when the user
tries to use IPV6 sockets. Instead realy on the operating system
to report the lack of protocol support via appropriate error messages.
This commit is contained in:
Bert Belder 2013-01-26 04:16:26 +01:00
parent 36883f29ea
commit 034ea318af
3 changed files with 0 additions and 13 deletions

View File

@ -323,9 +323,6 @@ int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers,
int WSAAPI uv_msafd_poll(SOCKET socket, AFD_POLL_INFO* info,
OVERLAPPED* overlapped);
/* Whether ipv6 is supported */
extern int uv_allow_ipv6;
/* Whether there are any non-IFS LSPs stacked on TCP */
extern int uv_tcp_non_ifs_lsp_ipv4;
extern int uv_tcp_non_ifs_lsp_ipv6;

View File

@ -769,11 +769,6 @@ int uv__tcp_connect6(uv_connect_t* req,
BOOL success;
DWORD bytes;
if (!uv_allow_ipv6) {
uv__set_sys_error(loop, WSAEAFNOSUPPORT);
return -1;
}
if (handle->flags & UV_HANDLE_BIND_ERROR) {
uv__set_sys_error(loop, handle->bind_error);
return -1;

View File

@ -25,9 +25,6 @@
#include "internal.h"
/* Whether ipv6 is supported */
int uv_allow_ipv6;
/* Whether there are any non-IFS LSPs stacked on TCP */
int uv_tcp_non_ifs_lsp_ipv4;
int uv_tcp_non_ifs_lsp_ipv6;
@ -131,8 +128,6 @@ void uv_winsock_init() {
dummy = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
if (dummy != INVALID_SOCKET) {
uv_allow_ipv6 = TRUE;
opt_len = (int) sizeof protocol_info;
if (!getsockopt(dummy,
SOL_SOCKET,