From 015f1c7de40839b6681b7dde7371093319c22e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Marek?= Date: Wed, 11 Mar 2026 10:46:51 +0100 Subject: [PATCH] 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 --- lib/hostip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hostip.c b/lib/hostip.c index 542b655b11..135c02b718 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -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;