rpms/squid/F-13 squid-3.1.1-ipv6_disabled.patch, NONE, 1.1 squid.spec, 1.167, 1.168
Henrik Nordström
hno at fedoraproject.org
Mon Apr 19 18:02:39 UTC 2010
Author: hno
Update of /cvs/pkgs/rpms/squid/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27526/F-13
Modified Files:
squid.spec
Added Files:
squid-3.1.1-ipv6_disabled.patch
Log Message:
Bump release due to missing patch in F-13 tree
squid-3.1.1-ipv6_disabled.patch:
comm.cc | 3 +++
ip/IpAddress.cc | 7 +++++++
ip/IpAddress.h | 8 ++++++++
3 files changed, 18 insertions(+)
--- NEW FILE squid-3.1.1-ipv6_disabled.patch ---
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
};
Index: squid.spec
===================================================================
RCS file: /cvs/pkgs/rpms/squid/F-13/squid.spec,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -p -r1.167 -r1.168
--- squid.spec 19 Apr 2010 17:55:50 -0000 1.167
+++ squid.spec 19 Apr 2010 18:02:39 -0000 1.168
@@ -4,7 +4,7 @@
Name: squid
Version: 3.1.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The Squid proxy caching server
Epoch: 7
License: GPLv2
@@ -261,7 +261,7 @@ fi
%changelog
-* Mon Apr 19 2010 Henrik Nordstrom <henrik at henriknordstrom.net> - 7:3.1.1-3
+* Mon Apr 19 2010 Henrik Nordstrom <henrik at henriknordstrom.net> - 7:3.1.1-4
- Bug #583489: Adjust logrotate script to changes in logrotate package.
* Fri Apr 19 2010 Jiri Skala <jskala at redhat.com>
More information about the scm-commits
mailing list