Hans Leidekker (@hans) commented about dlls/netprofm/list.c:
return in->sin6_family == AF_INET6 && in->sin6_addr.u.Byte[0] == 0xfe && (in->sin6_addr.u.Byte[1] & 0xc0) == 0x80; }
-static BOOL has_address( const IP_ADAPTER_ADDRESSES *aa, USHORT family ) +static void has_ipv6_address( const IP_ADAPTER_ADDRESSES *aa, BOOL *has_link_local, BOOL *has_global ) +{ + const IP_ADAPTER_UNICAST_ADDRESS *addr = aa->FirstUnicastAddress; + const struct in6_addr *sa6; + + *has_link_local = *has_global = FALSE; + for (addr = aa->FirstUnicastAddress; addr; addr = addr->Next) + { + if (addr->Address.lpSockaddr->sa_family != AF_INET6) continue; + sa6 = &((struct sockaddr_in6 *)addr->Address.lpSockaddr)->sin6_addr; + if (IN6_IS_ADDR_LINKLOCAL(sa6) || IN6_IS_ADDR_SITELOCAL(sa6)) + *has_link_local = TRUE;
IN6_IS_ADDR_SITELOCAL includes IN6_IS_ADDR_LINKLOCAL so you could omit the latter. Maybe call the parameter has_local or has_sitelocal because it's not just link local? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10432#note_133395