SHA256
1
0
forked from pool/squid

- 9be86d8db5e8f40829374d26334d0bb5272c1afd.patch: don't throw on

client errors

OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=294
This commit is contained in:
Adam Majer 2024-03-06 13:17:43 +00:00 committed by Git OBS Bridge
parent 17b414d940
commit 23219f8b97
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,29 @@
commit 9be86d8db5e8f40829374d26334d0bb5272c1afd
Author: Alex Rousskov <rousskov@measurement-factory.com>
Date: Fri Mar 1 22:20:20 2024 +0000
Bug 5069: Keep listening after getsockname() error (#1713)
ERROR: Stopped accepting connections:
error: getsockname() failed to locate local-IP on ...
In many cases, these failures are intermittent client-triggered errors
(e.g., client shut down the accepted socket); Squid will successfully
accept other connections and, hence, should keep listening for them.
diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc
index dcc52fbaa..aa082df4b 100644
--- a/src/comm/TcpAcceptor.cc
+++ b/src/comm/TcpAcceptor.cc
@@ -381,7 +381,10 @@ Comm::TcpAcceptor::acceptInto(Comm::ConnectionPointer &details)
if (getsockname(sock, gai->ai_addr, &gai->ai_addrlen) != 0) {
int xerrno = errno;
Ip::Address::FreeAddr(gai);
- throw TextException(ToSBuf("getsockname() failed to locate local-IP on ", details, ": ", xstrerr(xerrno)), Here());
+ debugs(50, DBG_IMPORTANT, "ERROR: Closing accepted TCP connection after failing to obtain its local IP address" <<
+ Debug::Extra << "accepted connection: " << details <<
+ Debug::Extra << "getsockname(2) error: " << xstrerr(xerrno));
+ return false;
}
details->local = *gai;
Ip::Address::FreeAddr(gai);

View File

@ -19,6 +19,8 @@ Wed Mar 6 12:02:14 UTC 2024 - Adam Majer <adam.majer@suse.de>
- squid.keyring: updated - squid.keyring: updated
- header_fixups.patch: added - header_fixups.patch: added
- 9be86d8db5e8f40829374d26334d0bb5272c1afd.patch: don't throw on
client errors
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 26 13:37:08 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org> Mon Feb 26 13:37:08 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -52,6 +52,7 @@ Patch1: missing_installs.patch
Patch2: old_nettle_compat.patch Patch2: old_nettle_compat.patch
Patch3: harden_squid.service.patch Patch3: harden_squid.service.patch
Patch4: header_fixups.patch Patch4: header_fixups.patch
Patch5: 9be86d8db5e8f40829374d26334d0bb5272c1afd.patch
BuildRequires: cppunit-devel BuildRequires: cppunit-devel
BuildRequires: expat BuildRequires: expat
BuildRequires: fdupes BuildRequires: fdupes
@ -109,6 +110,7 @@ accelerator.
cp %{SOURCE10} . cp %{SOURCE10} .
%patch -P 3 -p1 %patch -P 3 -p1
%patch -P4 -p1 %patch -P4 -p1
%patch -P5 -p1
# upstream patches after RELEASE # upstream patches after RELEASE
perl -p -i -e 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|' `find -name "*.pl"` perl -p -i -e 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|' `find -name "*.pl"`