client: ipv6 reject when lws_getaddrinfo46 failed

https://github.com/warmcat/libwebsockets/issues/978
This commit is contained in:
namowen 2017-07-25 17:14:37 +08:00 committed by Andy Green
parent 3562e441e3
commit 61e58885f4

View file

@ -111,6 +111,14 @@ lws_client_connect_2(struct lws *wsi)
#ifdef LWS_USE_IPV6
if (wsi->ipv6) {
if (n) {
/* lws_getaddrinfo46 failed, there is no usable result */
lwsl_notice("%s: lws_getaddrinfo46 failed %d\n",
__func__, n);
cce = "ipv6 lws_getaddrinfo46 failed";
goto oom4;
}
memset(&sa46, 0, sizeof(sa46));
sa46.sa6.sin6_family = AF_INET6;