]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix handling of zero cache_peers with --enable-cache-digests (#1502)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 9 Oct 2023 23:57:11 +0000 (23:57 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 10 Oct 2023 18:21:42 +0000 (18:21 +0000)
The bug was introduced in recent commit 2e24d0b.

src/neighbors.cc

index 4b2a8bda3a0c2e3d3709405129a33076deb0de72..54835f9128cbb68637d83cd17540f98026cff834 100644 (file)
@@ -760,6 +760,9 @@ neighborsDigestSelect(PeerSelector *ps)
     int ichoice_count = 0;
     int p_rtt;
 
+    if (!Config.peers)
+        return nullptr;
+
     if (!request->flags.hierarchical)
         return nullptr;