Bug 2571: Squid with IPv6 fails to start on kernel without IPv6
Adds comm_open_listener() wrapper to perform IPv6/IPv4 failover on sockets
intended for listening only. Uses the wrapper in all places I can be sure of.
Open a port specially bound for listening or sending through a specific port.
This is a wrapper providing IPv4/IPv6 failover around comm_openex().
Please use for all listening sockets and bind() outbound sockets.
It will open a socket bound for:
- IPv4 if IPv6 is disabled or address is IPv4-native.
- IPv6 if address is IPv6-native
- IPv6 dual-stack mode if able to open [::]
When an open performs failover it update the given address to feedback
the new IPv4-only status of the socket. Further displays of the IP
(in debugs or cachemgr) will occur in Native IPv4 format.
A reconfigure is needed to reset the stored IP in most cases and attempt
a port re-open.