mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lws_getaddrinfov46: make sure to set ai_socktype for ipv6
This commit is contained in:
parent
2d04b40770
commit
6975847e62
1 changed files with 2 additions and 1 deletions
|
@ -33,6 +33,8 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
|
|||
memset(&hints, 0, sizeof(hints));
|
||||
*result = NULL;
|
||||
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
#ifdef LWS_WITH_IPV6
|
||||
if (wsi->ipv6) {
|
||||
|
||||
|
@ -44,7 +46,6 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
|
|||
#endif
|
||||
{
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
}
|
||||
|
||||
return getaddrinfo(ads, NULL, &hints, result);
|
||||
|
|
Loading…
Add table
Reference in a new issue