mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-29 14:01:50 +01:00
John Helliwell reported a runtime issue on Solaris since 1.5-dev5. Traces show that connect() returns EINVAL, which means the socket length is not appropriate for the family. Solaris does not like being called with sizeof and needs the address family's size on sockaddr_storage. The fix consists in adding a get_addr_len() function which returns the socket's address length based on its family. Tests show that this works for both IPv4 and IPv6 addresses.