Skip to content
Snippets Groups Projects
Commit 12ec2314 authored by Andy Green's avatar Andy Green
Browse files

client: ipv6 handle failed ads lookup

parent 2697be84
Branches
Tags
No related merge requests found
......@@ -241,10 +241,9 @@ create_new_conn:
#ifdef LWS_WITH_IPV6
if (wsi->ipv6) {
struct sockaddr_in6 *sa6 =
((struct sockaddr_in6 *)result->ai_addr);
struct sockaddr_in6 *sa6;
if (n) {
if (n || !result) {
/* lws_getaddrinfo46 failed, there is no usable result */
lwsl_notice("%s: lws_getaddrinfo46 failed %d\n",
__func__, n);
......@@ -252,6 +251,8 @@ create_new_conn:
goto oom4;
}
sa6 = ((struct sockaddr_in6 *)result->ai_addr);
memset(&sa46, 0, sizeof(sa46));
sa46.sa6.sin6_family = AF_INET6;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment