Fixed last change which only still worked if the OS returned the IPv6 socket first and now failed completely if not.
This commit is contained in:
parent
2f4de5c4b1
commit
e6eae9194f
1 changed files with 1 additions and 1 deletions
|
@ -721,7 +721,7 @@ if (preferred->ai_family == AF_INET6) {
|
||||||
sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off));
|
sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
sta = bind (newsock, result->ai_addr, result->ai_addrlen);
|
sta = bind (newsock, preferred->ai_addr, preferred->ai_addrlen);
|
||||||
p_freeaddrinfo(result);
|
p_freeaddrinfo(result);
|
||||||
if (sta == SOCKET_ERROR) /* bind error? */
|
if (sta == SOCKET_ERROR) /* bind error? */
|
||||||
return sim_err_sock (newsock, "bind", 1);
|
return sim_err_sock (newsock, "bind", 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue