From: wessels <> Date: Thu, 5 Feb 1998 06:35:04 +0000 (+0000) Subject: continue counting ICP_DENIED queries even after we stop replying to them. X-Git-Tag: SQUID_3_0_PRE1~4181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a47dc5ac1fcb8c8d404e11200ca002444361c5e;p=thirdparty%2Fsquid.git continue counting ICP_DENIED queries even after we stop replying to them. --- diff --git a/src/icp_v2.cc b/src/icp_v2.cc index f18a2070cd..d6dbee2bd2 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -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; } diff --git a/src/icp_v3.cc b/src/icp_v3.cc index 43cf12a603..5bcd1e1ee2 100644 --- a/src/icp_v3.cc +++ b/src/icp_v3.cc @@ -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; }