]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
continue counting ICP_DENIED queries even after we stop replying to them.
authorwessels <>
Thu, 5 Feb 1998 06:35:04 +0000 (06:35 +0000)
committerwessels <>
Thu, 5 Feb 1998 06:35:04 +0000 (06:35 +0000)
src/icp_v2.cc
src/icp_v3.cc

index f18a2070cdefd84483919a1279918b51494c19d8..d6dbee2bd2a5d326b8cbb7af34bf379d477297e4 100644 (file)
@@ -167,6 +167,14 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len)
            if (clientdbDeniedPercent(from.sin_addr) < 95) {
                reply = icpCreateMessage(ICP_DENIED, 0, url, header.reqnum, 0);
                icpUdpSend(fd, &from, reply, LOG_UDP_DENIED, icp_request->protocol);
+           } else {
+               /*
+                * count this DENIED query in the clientdb, even though
+                * we're not sending an ICP reply...
+                */
+               clientdbUpdate(from.sin_addr,
+                   LOG_UDP_DENIED,
+                   Config.Port.icp);
            }
            break;
        }
index 43cf12a60377f23d2d7ecb67ffd6f00b57c651d9..5bcd1e1ee2ba91b041a6f270500ccf6c514cff17 100644 (file)
@@ -39,6 +39,14 @@ icpHandleIcpV3(int fd, struct sockaddr_in from, char *buf, int len)
            if (clientdbDeniedPercent(from.sin_addr) < 95) {
                reply = icpCreateMessage(ICP_DENIED, 0, url, header.reqnum, 0);
                icpUdpSend(fd, &from, reply, LOG_UDP_DENIED, icp_request->protocol);
+           } else {
+               /*
+                * count this DENIED query in the clientdb, even though
+                * we're not sending an ICP reply...
+                */
+               clientdbUpdate(from.sin_addr,
+                   LOG_UDP_DENIED,
+                   Config.Port.icp);
            }
            break;
        }