From f5f780e0f7ce32c1f439690f4cd7d79405629158 Mon Sep 17 00:00:00 2001 From: Henrik Nordström Date: Apr 19 2010 18:02:39 +0000 Subject: Bump release due to missing patch in F-13 tree --- diff --git a/squid-3.1.1-ipv6_disabled.patch b/squid-3.1.1-ipv6_disabled.patch new file mode 100644 index 0000000..26f3b97 --- /dev/null +++ b/squid-3.1.1-ipv6_disabled.patch @@ -0,0 +1,52 @@ +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 + }; + + diff --git a/squid.spec b/squid.spec index 2e9bde4..2727809 100644 --- a/squid.spec +++ b/squid.spec @@ -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 - 7:3.1.1-3 +* Mon Apr 19 2010 Henrik Nordstrom - 7:3.1.1-4 - Bug #583489: Adjust logrotate script to changes in logrotate package. * Fri Apr 19 2010 Jiri Skala