wolfio: request only IPv4 addresses unless IPv6 support is enabled
This commit is contained in:
parent
26cc785fbc
commit
5f20f1171d
@ -1106,7 +1106,11 @@ int wolfIO_TcpConnect(SOCKET_T* sockfd, const char* ip, word16 port, int to_sec)
|
||||
/* use gethostbyname for c99 */
|
||||
#if defined(HAVE_GETADDRINFO)
|
||||
XMEMSET(&hints, 0, sizeof(hints));
|
||||
#ifdef WOLFSSL_IPV6
|
||||
hints.ai_family = AF_UNSPEC; /* detect IPv4 or IPv6 */
|
||||
#else
|
||||
hints.ai_family = AF_INET; /* detect only IPv4 */
|
||||
#endif
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user