hostip: clear the sockaddr_in6 structure before use

On Solaris this was causing intermittent issues when the private
structure member __sin6_src_id had unexpectedly some value. connect(2)
would then fail with EADDRNOTAVAIL.

Closes #20885
This commit is contained in:
Vladimír Marek 2026-03-11 10:46:51 +01:00 committed by Daniel Stenberg
parent 53a3b2114a
commit 015f1c7de4
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -680,6 +680,7 @@ static struct Curl_addrinfo *get_localhost6(int port, const char *name)
if(!ca)
return NULL;
memset(&sa6, 0, sizeof(sa6));
sa6.sin6_family = AF_INET6;
sa6.sin6_port = htons(port16);
sa6.sin6_flowinfo = 0;