]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 2571: Squid with IPv6 fails to start on kernel without IPv6
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Apr 2009 13:44:59 +0000 (01:44 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Apr 2009 13:44:59 +0000 (01:44 +1200)
commit31be869c4c5d3c3ca53e73170d739a35cd6fd937
tree7c0ca14adea2450d2ee7eccee25a487b91219b6d
parent9fa2e20882506f2d9c09ab601f4d8d77fbd63a72
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.
src/client_side.cc
src/comm.cc
src/comm.h
src/dns_internal.cc
src/htcp.cc
src/icp_v2.cc
src/ident.cc
src/snmp_core.cc
src/wccp.cc
src/wccp2.cc