From: wessels <> Date: Sat, 3 Oct 1998 09:56:47 +0000 (+0000) Subject: merge SQUID_2_0 branch X-Git-Tag: SQUID_3_0_PRE1~2609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4158729839c46078e9d2399d17c7df37206d3c97;p=thirdparty%2Fsquid.git merge SQUID_2_0 branch --- diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4f9038f82f..2d935b7b90 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,4 +1,5 @@ -Special thanks go to people who have volunteered their time, effort, and ideas to make this software available. +Special thanks go to people who have volunteered their time, effort, +and ideas to make this software available. Henrik Nordstrom Mark Treacy @@ -68,10 +69,11 @@ Special thanks go to people who have volunteered their time, effort, and ideas t Michael Lupp Development of this caching software is funded by the National Science -Foundation (grant NCR-9521745). Paid staff members on the caching -project are: +Foundation (grants NCR-9616602 and NCR-9521745). Paid staff members on +the caching project are: - Duane Wessels - Alex Rousskov + Duane Wessels + Alex Rousskov + Glenn Chisholm K Claffy Hans-Werner Braun diff --git a/ChangeLog b/ChangeLog index dbc339ed2c..2766c83707 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,14 +4,16 @@ Changes to Squid-2.1 (): - Replaced comm_select FD scanning loops with global fd_set structures. Inspired by Jeff Mogul's patch for squid 1.1. -Changes to Squid-2.0 (September 25, 1998): +Changes to Squid-2.0 (October 2, 1998): - Added NAT/Transparent hijacking code from Quinton Dolan. - Added actual filesystem usage to cachemgr 'storedir' page. - Only works for some operating systems. + Only works for operating systems which support statvfs(). - Fixed HTCP compile-time bugs. - Fixed quick_abort bugs. Configured values are stored as Kbytes, not bytes. + - Removed fwdAbortFetch(). It breaks quick_abort and seems + mostly useless. - Changed storeDirSelectSwapDir() to skip swap directories when their utilization is over the high water mark ratio. - Fixed off-by-one bug for dead neighbor detection (Joe Ramey). @@ -28,16 +30,22 @@ Changes to Squid-2.0 (September 25, 1998): send a "200" response instead of "206" (because we cannot handle complex ranges, even for hits) Note: Support for complex ranges requires storage of partial objects. - - removed mib-2.system group from squid. - - removed the ability to iterate through: ipcache/dnscache. - - added ipcache/dnscache/fqdncache basic statistics. - - converted SQUID-MIB to SMIv2. - - moved SQUID-MIB to enterprises section of the tree in preparation + - Removed SNMP mib-2.system group from squid. + - Removed SNMP ability to iterate through ipcache and friends. + - Added SNMP ipcache/fqdncache basic statistics. + - Converted SQUID-MIB to SMIv2 (RFC 1902). + - Moved SQUID-MIB to enterprises section of the tree in preparation of the split into PROXY-MIB & SQUID-MIB. - - corrected minor errors in SQUID-MIB. - - moved uptime into cacheSystem from cacheConfig. - - corrected a number of get-next-request bugs, a snmpwalk should now + - Corrected minor errors in SQUID-MIB. + - Moved uptime into cacheSystem from cacheConfig. + - Corrected a number of get-next-request bugs, snmpwalk should now return all objects and not skip some. + - Fixed netdbClosestParent() so it won't return sibling + peers. + - Fixed a bug with secondary clients on entries with + ENTRY_BAD_LENGTH set. We should release the + bad entry to prevent secondary clients jumping on. + - Changed MIB to prevent parse warnings at startup. Changes to squid-1.2.beta25 (September 21, 1998): diff --git a/src/StatHist.cc b/src/StatHist.cc index c3f0bded5d..49753ed313 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -1,6 +1,6 @@ /* - * $Id: StatHist.cc,v 1.12 1998/07/22 20:36:54 wessels Exp $ + * $Id: StatHist.cc,v 1.13 1998/10/03 03:56:51 wessels Exp $ * * DEBUG: section 62 Generic Histogram * AUTHOR: Duane Wessels @@ -127,8 +127,12 @@ static int statHistBin(const StatHist * H, double v) { int bin; +#if BROKEN_STAT_HIST_BIN + return 0; + /* NOTREACHED */ +#endif v -= H->min; /* offset */ - if (v < 0.0) /* too small */ + if (v <= 0.0) /* too small */ return 0; bin = (int) (H->scale * H->val_in(v) + 0.5); if (bin < 0) /* should not happen */ diff --git a/src/client_side.cc b/src/client_side.cc index 6871e3a920..e797723615 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.405 1998/09/30 02:53:18 wessels Exp $ + * $Id: client_side.cc,v 1.406 1998/10/03 03:56:52 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1615,17 +1615,21 @@ clientProcessRequest2(clientHttpRequest * http) } else if (!storeEntryValidToSend(e)) { http->entry = NULL; return LOG_TCP_MISS; - } else if (EBIT_TEST(e->flags, ENTRY_SPECIAL)) { + } + if (EBIT_TEST(e->flags, ENTRY_SPECIAL)) { /* Special entries are always hits, no matter what the client says */ http->entry = e; return LOG_TCP_HIT; + } #if HTTP_VIOLATIONS - } else if (r->flags.nocache_hack) { - http->entry = NULL; + if (r->flags.nocache_hack) { + /* if nocache_hack is set, nocache should always be clear, right? */ + assert(!r->flags.nocache); ipcacheReleaseInvalid(r->host); - return LOG_TCP_CLIENT_REFRESH_MISS; + /* continue! */ + } #endif - } else if (r->flags.nocache) { + if (r->flags.nocache) { http->entry = NULL; ipcacheReleaseInvalid(r->host); return LOG_TCP_CLIENT_REFRESH_MISS; @@ -1635,10 +1639,9 @@ clientProcessRequest2(clientHttpRequest * http) * that is also a HIT. Thus, let's prevent HITs on complex Range requests */ http->entry = NULL; return LOG_TCP_MISS; - } else { - http->entry = e; - return LOG_TCP_HIT; } + http->entry = e; + return LOG_TCP_HIT; } static void diff --git a/src/mib.txt b/src/mib.txt index ff4c4f0c45..bd494aace8 100644 --- a/src/mib.txt +++ b/src/mib.txt @@ -1,7 +1,8 @@ SQUID-MIB DEFINITIONS ::= BEGIN -- --- $Id: mib.txt,v 1.16 1998/09/23 21:21:08 glenn Exp $ +-- $Id: mib.txt,v 1.17 1998/10/03 03:56:53 wessels Exp $ -- + IMPORTS enterprises, Unsigned32, TimeTicks, Gauge32, Counter32, MODULE-IDENTITY, OBJECT-TYPE @@ -37,10 +38,21 @@ squid MODULE-IDENTITY "Move to SMIv2. Prepare to split into proxy/squid." ::= { nlanr 1 } --- Do NOT remove the following line - -- v 1.16 1998/09/22 glenn@ircache.net +-- +-- This is a hack to get around a problem with the current +-- version of the SNMP library. Remove the following seven lines +-- before using with SNMP tools. +-- +org OBJECT IDENTIFIER ::= { iso 1 } +dod OBJECT IDENTIFIER ::= { org 6 } +intenet OBJECT IDENTIFIER ::= { dod 1 } +private OBJECT IDENTIFIER ::= { intenet 4 } +enterprises OBJECT IDENTIFIER ::= { private 1 } +nlanr OBJECT IDENTIFIER ::= { enterprises 3495 } +squid OBJECT IDENTIFIER ::= { nlanr 1 } + -- -- OID Assignments -- diff --git a/src/neighbors.cc b/src/neighbors.cc index 9e1340693b..5819b7ca0a 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.255 1998/09/29 01:32:59 wessels Exp $ + * $Id: neighbors.cc,v 1.256 1998/10/03 03:56:54 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -719,7 +719,8 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const struct socka if (opcode > ICP_END) return; opcode_d = icp_opcode_str[opcode]; - neighborUpdateRtt(p, mem); + if (p) + neighborUpdateRtt(p, mem); /* Does the entry exist? */ if (NULL == entry) { debug(12, 3) ("neighborsUdpAck: Cache key '%s' not found\n", diff --git a/src/store.cc b/src/store.cc index 015a295546..424ebca551 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.464 1998/09/21 07:01:26 wessels Exp $ + * $Id: store.cc,v 1.465 1998/10/03 03:56:56 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -566,8 +566,10 @@ storeComplete(StoreEntry * e) e->mem_obj->object_sz = e->mem_obj->inmem_hi; e->store_status = STORE_OK; assert(e->mem_status == NOT_IN_MEMORY); - if (!storeEntryValidLength(e)) + if (!storeEntryValidLength(e)) { EBIT_SET(e->flags, ENTRY_BAD_LENGTH); + storeReleaseRequest(e); + } #if USE_CACHE_DIGESTS if (e->mem_obj->request) e->mem_obj->request->hier.store_complete_stop = current_time;