Various IPv6 related fixes
This commit is contained in:
parent
34e993cf86
commit
de8778fa44
@ -1,2 +1,6 @@
|
||||
squid-3.1.3.tar.bz2
|
||||
squid-3.1.3.tar.bz2.asc
|
||||
squid-3.1-9967.patch
|
||||
squid-3.1-9968.patch
|
||||
squid-3.1-9969.patch
|
||||
squid-3.1-9970.patch
|
||||
|
4
sources
4
sources
@ -1,2 +1,6 @@
|
||||
5b9ec56d38106826caf3888ab62bf865 squid-3.1.3.tar.bz2
|
||||
73ef4731b94ede53f82d7f149f96b329 squid-3.1.3.tar.bz2.asc
|
||||
0179f45a3ad39e44870cd573c3712280 squid-3.1-9967.patch
|
||||
1803005fc493a457bc544a0c9c4e06d7 squid-3.1-9968.patch
|
||||
b61bddb9fecd92b3d85ea553da0eb1c4 squid-3.1-9969.patch
|
||||
96b2df1dd9e5d127e9c74ff826e95cf3 squid-3.1-9970.patch
|
||||
|
@ -1,52 +0,0 @@
|
||||
diff -up squid-3.1.1/src/comm.cc.ipv6_disabled squid-3.1.1/src/comm.cc
|
||||
--- squid-3.1.1/src/comm.cc.ipv6_disabled 2010-03-29 12:02:56.000000000 +0200
|
||||
+++ squid-3.1.1/src/comm.cc 2010-04-02 15:31:50.467098739 +0200
|
||||
@@ -637,6 +637,9 @@ comm_open_listener(int sock_type,
|
||||
/* attempt to open this IPv4-only. */
|
||||
sock = comm_openex(sock_type, proto, addr, flags, 0, note);
|
||||
debugs(50, 2, HERE << "attempt open " << note << " socket on: " << addr);
|
||||
+
|
||||
+ /* disable IPv6 */
|
||||
+ IpAddress::SetIPv6Disabled(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
diff -up squid-3.1.1/src/ip/IpAddress.cc.ipv6_disabled squid-3.1.1/src/ip/IpAddress.cc
|
||||
--- squid-3.1.1/src/ip/IpAddress.cc.ipv6_disabled 2010-03-29 12:02:56.000000000 +0200
|
||||
+++ squid-3.1.1/src/ip/IpAddress.cc 2010-04-02 15:44:38.759070488 +0200
|
||||
@@ -250,6 +250,9 @@ bool IpAddress::IsIPv4() const
|
||||
bool IpAddress::IsIPv6() const
|
||||
{
|
||||
#if USE_IPV6
|
||||
+ if(m_IPv6Disabled)
|
||||
+ return false;
|
||||
+
|
||||
return IsAnyAddr() || IsNoAddr() || !IN6_IS_ADDR_V4MAPPED( &m_SocketAddr.sin6_addr );
|
||||
#else
|
||||
return false; // enforce IPv4 in IPv4-only mode.
|
||||
@@ -1186,3 +1189,7 @@ bool IpAddress::GetInAddr(struct in_addr
|
||||
assert(false);
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+#if USE_IPV6
|
||||
+bool IpAddress::m_IPv6Disabled = false;
|
||||
+#endif
|
||||
diff -up squid-3.1.1/src/ip/IpAddress.h.ipv6_disabled squid-3.1.1/src/ip/IpAddress.h
|
||||
--- squid-3.1.1/src/ip/IpAddress.h.ipv6_disabled 2010-03-29 12:02:56.000000000 +0200
|
||||
+++ squid-3.1.1/src/ip/IpAddress.h 2010-04-02 15:42:15.060319653 +0200
|
||||
@@ -428,6 +428,14 @@ private:
|
||||
static const struct in6_addr v4_anyaddr;
|
||||
static const struct in6_addr v6_noaddr;
|
||||
#endif
|
||||
+
|
||||
+/* IPv6 stack can be disabled */
|
||||
+#if USE_IPV6
|
||||
+private:
|
||||
+ static bool m_IPv6Disabled;
|
||||
+public:
|
||||
+ static void SetIPv6Disabled(bool state) { m_IPv6Disabled = state; }
|
||||
+#endif
|
||||
};
|
||||
|
||||
|
19
squid.spec
19
squid.spec
@ -4,7 +4,7 @@
|
||||
|
||||
Name: squid
|
||||
Version: 3.1.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The Squid proxy caching server
|
||||
Epoch: 7
|
||||
License: GPLv2
|
||||
@ -21,7 +21,10 @@ Source98: perl-requires-squid.sh
|
||||
## Source99: filter-requires-squid.sh
|
||||
|
||||
# Upstream patches
|
||||
#Patch001: http://www.squid-cache.org/Versions/v3/3.1/changesets/squid-3.1-XXXX.patch
|
||||
Patch001: http://www.squid-cache.org/Versions/v3/3.1/changesets/squid-3.1-9967.patch
|
||||
Patch002: http://www.squid-cache.org/Versions/v3/3.1/changesets/squid-3.1-9968.patch
|
||||
Patch003: http://www.squid-cache.org/Versions/v3/3.1/changesets/squid-3.1-9969.patch
|
||||
Patch004: http://www.squid-cache.org/Versions/v3/3.1/changesets/squid-3.1-9970.patch
|
||||
|
||||
# Local patches
|
||||
# Applying upstream patches first makes it less likely that local patches
|
||||
@ -31,7 +34,6 @@ Patch202: squid-3.1.0.9-location.patch
|
||||
Patch204: squid-3.0.STABLE1-perlpath.patch
|
||||
Patch205: squid-3.1.0.15-smb-path.patch
|
||||
Patch208: squid-3.0.STABLE7-from_manpg.patch
|
||||
Patch209: squid-3.1.1-ipv6_disabled.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: bash >= 2.0
|
||||
@ -69,14 +71,16 @@ lookup program (dnsserver), a program for retrieving FTP data
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
#patch001 -p0 -b .3.1-XXXX
|
||||
%patch001 -p0 -b .3.1-9967
|
||||
%patch002 -p0 -b .3.1-9968
|
||||
%patch003 -p0 -b .3.1-9969
|
||||
%patch004 -p0 -b .3.1-9970
|
||||
|
||||
%patch201 -p1 -b .config
|
||||
%patch202 -p1 -b .location
|
||||
%patch204 -p1 -b .perlpath
|
||||
%patch205 -p1 -b .smb-path
|
||||
%patch208 -p1 -b .from_manpg
|
||||
%patch209 -p1 -b .ipv6_disabled
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -261,6 +265,11 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri May 14 2010 Henrik Nordstrom <henrik@henriknordstrom.net> - 7:3.1.3-2
|
||||
- Fully fix #548903 - "comm_open: socket failure: (97) Address family not supported by protocol" if IPv6 disabled
|
||||
- Various IPv6 related issues fixed, making tcp_outgoing_address behave
|
||||
as expected and no commResetFD warnings when using tproxy setups.
|
||||
|
||||
* Sat May 02 2010 Henrik Nordstrom <henrik@henriknordstrom.net> - 7:3.1.3-1
|
||||
- Update to 3.1.3 Upstream bugfix release, fixing WCCPv1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user