mirror of
https://github.com/curl/curl.git
synced 2026-04-13 00:31:41 +08:00
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:
parent
53a3b2114a
commit
015f1c7de4
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user