diff --git a/9be86d8db5e8f40829374d26334d0bb5272c1afd.patch b/9be86d8db5e8f40829374d26334d0bb5272c1afd.patch new file mode 100644 index 0000000..514cd56 --- /dev/null +++ b/9be86d8db5e8f40829374d26334d0bb5272c1afd.patch @@ -0,0 +1,29 @@ +commit 9be86d8db5e8f40829374d26334d0bb5272c1afd +Author: Alex Rousskov +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); diff --git a/squid.changes b/squid.changes index 7ebe4ad..5cda8ab 100644 --- a/squid.changes +++ b/squid.changes @@ -19,6 +19,8 @@ Wed Mar 6 12:02:14 UTC 2024 - Adam Majer - squid.keyring: updated - header_fixups.patch: added +- 9be86d8db5e8f40829374d26334d0bb5272c1afd.patch: don't throw on + client errors ------------------------------------------------------------------- Mon Feb 26 13:37:08 UTC 2024 - Dominique Leuenberger diff --git a/squid.spec b/squid.spec index 59ce06c..aeca282 100644 --- a/squid.spec +++ b/squid.spec @@ -52,6 +52,7 @@ Patch1: missing_installs.patch Patch2: old_nettle_compat.patch Patch3: harden_squid.service.patch Patch4: header_fixups.patch +Patch5: 9be86d8db5e8f40829374d26334d0bb5272c1afd.patch BuildRequires: cppunit-devel BuildRequires: expat BuildRequires: fdupes @@ -109,6 +110,7 @@ accelerator. cp %{SOURCE10} . %patch -P 3 -p1 %patch -P4 -p1 +%patch -P5 -p1 # upstream patches after RELEASE perl -p -i -e 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|' `find -name "*.pl"`