diff -ruN squid-2.5.STABLE8/ChangeLog squid-2.5.STABLE9/ChangeLog
--- squid-2.5.STABLE8/ChangeLog Fri Feb 11 04:25:14 2005
+++ squid-2.5.STABLE9/ChangeLog Wed Feb 23 16:53:37 2005
@@ -1,3 +1,20 @@
+Changes to squid-2.5.STABLE9 (24 Feb 2005)
+
+ - [Medium] Don't retry requests on 403 errors (Bug #1210)
+ - [Minor] Ignore invalid FQDN DNS responses (Bug #1222)
+ - [Minor] cache_peer related memory leaks on reconfigure (Bug #1246)
+ - [Minor] relaxed_header_parser extended to work around even more
+ broken web servers (Bug #1242)
+ - [Minor] FTP gatewaying URLs cleaned up slightly, mainly to work
+ better with Mozilla but also to improve security slightly on
+ non-anonymous FTP.
+ - [Minor] High characters allowed un-encoded in FTP and Gopher
+ listings to allow the user-agent to display data in non-iso8859-1
+ charsets. (Bug #1220)
+ - [Cosmetic] format fixes to silence compiler warnings on many
+ platforms.
+ - [Major] Assertion failures on certain odd DNS responses (Bug #1234)
+
Changes to squid-2.5.STABLE8 (11 Feb 2005)
- [Minor] 100% CPU usage on half-closed PUT/POST requests (Bug #354,
diff -ruN squid-2.5.STABLE8/RELEASENOTES.html squid-2.5.STABLE9/RELEASENOTES.html
--- squid-2.5.STABLE8/RELEASENOTES.html Fri Feb 11 04:30:25 2005
+++ squid-2.5.STABLE9/RELEASENOTES.html Wed Feb 23 16:55:05 2005
@@ -1,13 +1,13 @@
-
+
Squid 2.5 release notes
Squid 2.5 release notes
-Squid Developers
$Id: release-2.5.html,v 1.1.2.41 2005/02/04 14:39:49 hno Exp $
+Squid Developers
$Id: release-2.5.html,v 1.1.2.44 2005/02/23 00:26:20 hno Exp $
This document contains the release notes for version 2.5 of Squid.
Squid is a WWW Cache application developed by the National Laboratory
@@ -138,6 +138,7 @@
reply_header_max_sizeNew directive in 2.5.STABLE7 limiting the size of HTTP reply headers, similar to request_header_max_size but in the reply direction (from servers to clients). Default is 20KB.
acl req_hdr/resp_hdrNew acl types in 2.5.STABLE7 to match arbitrary HTTP headers, useful to block certain malware/spyware etc.
relaxed_http_parserNew directive in 2.5.STABLE8 to control how strict the HTTP parser should be.
+retry_on_errorNew directive in 2.5.STABLE9 to aggressive retry requests on errors (was the default in earlier versions)
@@ -158,6 +159,12 @@
#779users going above their allowed IP count no longer logged in cache.log
Bug
#1204FTP listings uses "BASE HREF" much more than it needs to
+Bug
+#888ntlm_user_pool assertion error on shutdown
+Bug
+#1223Authentication could be more informative on why a login failed
+Bug
+#1227Syslog facility should not be hardcoded to "local4"
@@ -368,6 +375,22 @@
Properly handle oversized reply headers
a number of other minor and cosmetic bugfixes. See the list of
squid-2.5.STABLE7 patches and the
+ChangeLog file for details.
+
+
+
+
+
+
+
+- DNS related assertion error
+- High characters allowed in FTP & Gopher listings.
+- Additional workarounds for broken web servers rejected by 2.5.STABLE8.
+- No longer automatically retries requests on 403 Access Denied or
+many other server errors. New squid.conf directive retry_on_error to revert
+back to the old behaviour if needed.
+- a number of other minor and cosmetic bugfixes. See the list of
+squid-2.5.STABLE8 patches and the
ChangeLog file for details.
diff -ruN squid-2.5.STABLE8/bootstrap.sh squid-2.5.STABLE9/bootstrap.sh
--- squid-2.5.STABLE8/bootstrap.sh Thu Oct 31 14:22:23 2002
+++ squid-2.5.STABLE9/bootstrap.sh Sun Feb 20 18:33:44 2005
@@ -52,6 +52,13 @@
fi
}
+fixmakefiles() {
+ bad_files="`find . -name Makefile.in | xargs grep -l "AR = ar"`"
+ if [ -n "$bad_files" ]; then
+ perl -i -p -e 's/^/#/ if /^AR = ar/' $bad_files
+ fi
+}
+
# Make sure cfgaux exists
mkdir -p cfgaux
@@ -63,6 +70,7 @@
bootstrap aclocal$amver
bootstrap autoheader$acver
bootstrap automake$amver --foreign --add-missing
+fixmakefiles
bootstrap autoconf$acver
echo "Autotool bootstrapping complete."
diff -ruN squid-2.5.STABLE8/configure squid-2.5.STABLE9/configure
--- squid-2.5.STABLE8/configure Fri Feb 11 04:30:17 2005
+++ squid-2.5.STABLE9/configure Wed Feb 23 16:54:54 2005
@@ -1000,7 +1000,7 @@
# Define the identity of the package.
PACKAGE=squid
-VERSION=2.5.STABLE8
+VERSION=2.5.STABLE9
cat >> confdefs.h <&6
echo "configure:1057: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
@@ -2273,7 +2273,7 @@
case "$host" in
*-linux-*)
;;
- *-solaris-*)
+ *-solaris*)
;;
*-freebsd*)
;;
diff -ruN squid-2.5.STABLE8/configure.in squid-2.5.STABLE9/configure.in
--- squid-2.5.STABLE8/configure.in Fri Feb 11 04:30:17 2005
+++ squid-2.5.STABLE9/configure.in Wed Feb 23 16:54:54 2005
@@ -3,15 +3,15 @@
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.251.2.78 2005/02/11 11:25:14 hno Exp $
+dnl $Id: configure.in,v 1.251.2.81 2005/02/23 23:53:39 hno Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(cfgaux)
-AM_INIT_AUTOMAKE(squid, 2.5.STABLE8)
+AM_INIT_AUTOMAKE(squid, 2.5.STABLE9)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.251.2.78 $)dnl
+AC_REVISION($Revision: 1.251.2.81 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
@@ -535,7 +535,7 @@
case "$host" in
*-linux-*)
;;
- *-solaris-*)
+ *-solaris*)
;;
*-freebsd*)
;;
diff -ruN squid-2.5.STABLE8/helpers/basic_auth/LDAP/squid_ldap_auth.c squid-2.5.STABLE9/helpers/basic_auth/LDAP/squid_ldap_auth.c
--- squid-2.5.STABLE8/helpers/basic_auth/LDAP/squid_ldap_auth.c Sat Feb 5 03:53:07 2005
+++ squid-2.5.STABLE9/helpers/basic_auth/LDAP/squid_ldap_auth.c Sun Feb 20 12:07:44 2005
@@ -273,7 +273,7 @@
static int
validUsername(const char *user)
{
- const unsigned char *p = user;
+ const unsigned char *p = (const unsigned char *)user;
/* Leading whitespace? */
if (isspace(p[0]))
diff -ruN squid-2.5.STABLE8/helpers/basic_auth/winbind/wbntlm.h squid-2.5.STABLE9/helpers/basic_auth/winbind/wbntlm.h
--- squid-2.5.STABLE8/helpers/basic_auth/winbind/wbntlm.h Sat Jul 20 05:26:55 2002
+++ squid-2.5.STABLE9/helpers/basic_auth/winbind/wbntlm.h Sun Feb 20 12:07:44 2005
@@ -37,7 +37,7 @@
/* Debugging stuff */
extern char *myname;
-static char *__foo;
+static const char *__foo;
extern pid_t mypid;
extern char debug_enabled;
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/SMB/libntlmssp.c squid-2.5.STABLE9/helpers/ntlm_auth/SMB/libntlmssp.c
--- squid-2.5.STABLE8/helpers/ntlm_auth/SMB/libntlmssp.c Fri Jun 11 10:07:55 2004
+++ squid-2.5.STABLE9/helpers/ntlm_auth/SMB/libntlmssp.c Sun Feb 20 12:07:44 2005
@@ -72,8 +72,8 @@
#define ENCODED_PASS_LEN 24
-static char challenge[NONCE_LEN];
-static char lmencoded_empty_pass[ENCODED_PASS_LEN],
+static unsigned char challenge[NONCE_LEN];
+static unsigned char lmencoded_empty_pass[ENCODED_PASS_LEN],
ntencoded_empty_pass[ENCODED_PASS_LEN];
SMB_Handle_Type handle = NULL;
@@ -139,8 +139,8 @@
return 3;
}
memcpy(challenge, handle->Encrypt_Key, NONCE_LEN);
- SMBencrypt("",challenge,lmencoded_empty_pass);
- SMBNTencrypt("",challenge,ntencoded_empty_pass);
+ SMBencrypt((unsigned char *)"",challenge,lmencoded_empty_pass);
+ SMBNTencrypt((unsigned char *)"",challenge,ntencoded_empty_pass);
return 0;
}
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/SMB/ntlm.h squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm.h
--- squid-2.5.STABLE8/helpers/ntlm_auth/SMB/ntlm.h Wed Nov 28 01:01:59 2001
+++ squid-2.5.STABLE9/helpers/ntlm_auth/SMB/ntlm.h Sun Feb 20 12:07:44 2005
@@ -50,7 +50,7 @@
#ifdef DEBUG
#include
#include
-static char *__foo;
+static const char *__foo;
extern char debug_enabled;
#define debug(X...) if (debug_enabled) { \
fprintf(stderr,"ntlm-auth[%d](%s:%d): ", getpid(), \
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/SMB/smbval/Makefile.in squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/Makefile.in
--- squid-2.5.STABLE8/helpers/ntlm_auth/SMB/smbval/Makefile.in Sat Jul 10 06:11:46 2004
+++ squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/Makefile.in Sun Feb 20 18:35:48 2005
@@ -173,7 +173,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/SMB/smbval/smblib-priv.h squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib-priv.h
--- squid-2.5.STABLE8/helpers/ntlm_auth/SMB/smbval/smblib-priv.h Fri Mar 9 17:55:38 2001
+++ squid-2.5.STABLE9/helpers/ntlm_auth/SMB/smbval/smblib-priv.h Sun Feb 20 12:07:44 2005
@@ -497,7 +497,7 @@
/* The following two arrays need to be in step! */
/* We must make it possible for callers to specify these ... */
-
+#if 0
extern char *SMB_Prots[];
/*
@@ -532,6 +532,8 @@
* SMB_P_NT1,
* -1};
*/
+#endif
+
typedef struct SMB_Status {
union {
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/winbind/wb_ntlm_auth.c squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wb_ntlm_auth.c
--- squid-2.5.STABLE8/helpers/ntlm_auth/winbind/wb_ntlm_auth.c Fri Sep 12 04:11:25 2003
+++ squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wb_ntlm_auth.c Sun Feb 20 12:07:45 2005
@@ -137,7 +137,7 @@
}
static unsigned char challenge[CHALLENGE_LEN + 1];
-static char *
+static unsigned char *
build_challenge(void)
{
size_t gotchars;
diff -ruN squid-2.5.STABLE8/helpers/ntlm_auth/winbind/wbntlm.h squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wbntlm.h
--- squid-2.5.STABLE8/helpers/ntlm_auth/winbind/wbntlm.h Sun May 19 17:45:31 2002
+++ squid-2.5.STABLE9/helpers/ntlm_auth/winbind/wbntlm.h Sun Feb 20 12:07:45 2005
@@ -37,7 +37,7 @@
/* Debugging stuff */
extern char *myname;
-static char *__foo;
+static const char *__foo;
extern pid_t mypid;
extern char debug_enabled;
diff -ruN squid-2.5.STABLE8/include/config.h squid-2.5.STABLE9/include/config.h
--- squid-2.5.STABLE8/include/config.h Sat Apr 17 19:29:51 2004
+++ squid-2.5.STABLE9/include/config.h Sun Feb 20 04:02:56 2005
@@ -1,5 +1,5 @@
/*
- * $Id: config.h,v 1.4.2.1 2004/04/18 01:29:51 hno Exp $
+ * $Id: config.h,v 1.4.2.2 2005/02/20 11:02:56 hno Exp $
*
* AUTHOR: Duane Wessels
*
@@ -163,6 +163,7 @@
#define xisascii(x) isascii((unsigned char)x)
#define xislower(x) islower((unsigned char)x)
#define xisalpha(x) isalpha((unsigned char)x)
+#define xisalnum(x) isalnum((unsigned char)x)
#define xisgraph(x) isgraph((unsigned char)x)
#if HAVE_RANDOM
diff -ruN squid-2.5.STABLE8/include/ntlmauth.h squid-2.5.STABLE9/include/ntlmauth.h
--- squid-2.5.STABLE8/include/ntlmauth.h Mon May 12 12:48:07 2003
+++ squid-2.5.STABLE9/include/ntlmauth.h Sun Feb 20 12:07:45 2005
@@ -1,5 +1,5 @@
/*
- * $Id: ntlmauth.h,v 1.8.2.1 2003/05/12 18:48:07 hno Exp $
+ * $Id: ntlmauth.h,v 1.8.2.2 2005/02/20 19:07:45 hno Exp $
*
* * * * * * * * Legal stuff * * * * * * *
*
@@ -173,7 +173,7 @@
} ntlm_authenticate;
const char *ntlm_make_challenge(char *domain, char *domain_controller,
- char *challenge_nonce, int challenge_nonce_len);
+ unsigned char *challenge_nonce, int challenge_nonce_len);
lstring ntlm_fetch_string(char *packet, int32_t length, strhdr * str);
void ntlm_add_to_payload(char *payload, int *payload_length,
strhdr * hdr, char *toadd,
diff -ruN squid-2.5.STABLE8/include/version.h squid-2.5.STABLE9/include/version.h
--- squid-2.5.STABLE8/include/version.h Fri Feb 11 04:30:17 2005
+++ squid-2.5.STABLE9/include/version.h Wed Feb 23 16:54:54 2005
@@ -9,5 +9,5 @@
*/
#ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1108121414
+#define SQUID_RELEASE_TIME 1109202891
#endif
diff -ruN squid-2.5.STABLE8/lib/GNUregex.c squid-2.5.STABLE9/lib/GNUregex.c
--- squid-2.5.STABLE8/lib/GNUregex.c Thu Jun 19 18:09:06 2003
+++ squid-2.5.STABLE9/lib/GNUregex.c Sun Feb 20 12:07:45 2005
@@ -1,5 +1,5 @@
/*
- * $Id: GNUregex.c,v 1.12.2.1 2003/06/20 00:09:06 hno Exp $
+ * $Id: GNUregex.c,v 1.12.2.2 2005/02/20 19:07:45 hno Exp $
*/
/* Extended regular expression matching and search library,
@@ -3663,7 +3663,7 @@
/* Compare that many; failure if mismatch, else move
* past them. */
if (translate
- ? bcmp_translate(d, d2, mcnt, translate)
+ ? bcmp_translate((unsigned char *)d, (unsigned char *)d2, mcnt, translate)
: memcmp(d, d2, mcnt))
goto fail;
d += mcnt, d2 += mcnt;
diff -ruN squid-2.5.STABLE8/lib/Makefile.in squid-2.5.STABLE9/lib/Makefile.in
--- squid-2.5.STABLE8/lib/Makefile.in Wed Sep 1 04:30:29 2004
+++ squid-2.5.STABLE9/lib/Makefile.in Sun Feb 20 18:35:48 2005
@@ -14,7 +14,7 @@
@SET_MAKE@
#
-# $Id: Makefile.in,v 1.57.2.14 2004/09/01 10:30:29 hno Exp $
+# $Id: Makefile.in,v 1.57.2.15 2005/02/21 01:35:48 hno Exp $
#
SHELL = @SHELL@
@@ -254,7 +254,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/lib/html_quote.c squid-2.5.STABLE9/lib/html_quote.c
--- squid-2.5.STABLE8/lib/html_quote.c Wed Oct 17 13:46:43 2001
+++ squid-2.5.STABLE9/lib/html_quote.c Mon Feb 14 17:27:33 2005
@@ -1,5 +1,5 @@
/*
- * $Id: html_quote.c,v 1.4 2001/10/17 19:46:43 hno Exp $
+ * $Id: html_quote.c,v 1.4.2.1 2005/02/15 00:27:33 hno Exp $
*
* DEBUG:
* AUTHOR: Robert Collins
@@ -109,15 +109,6 @@
escape = htmlstandardentities[i].quote;
break;
}
- }
- /* Encode control chars just to be on the safe side, and make
- * sure all 8-bit characters are encoded to protect from buggy
- * clients
- */
- if (!escape && (ch <= 0x1F || ch >= 0x7f) && ch != '\n' && ch != '\r' && ch != '\t') {
- static char dec_encoded[7];
- snprintf(dec_encoded, sizeof dec_encoded, "%3d;", (int) ch);
- escape = dec_encoded;
}
if (escape) {
/* Ok, An escaped form was found above. Use it */
diff -ruN squid-2.5.STABLE8/lib/ntlmauth.c squid-2.5.STABLE9/lib/ntlmauth.c
--- squid-2.5.STABLE8/lib/ntlmauth.c Fri Aug 20 02:09:58 2004
+++ squid-2.5.STABLE9/lib/ntlmauth.c Sun Feb 20 12:07:45 2005
@@ -1,5 +1,5 @@
/*
- * $Id: ntlmauth.c,v 1.5.2.3 2004/08/20 08:09:58 hno Exp $
+ * $Id: ntlmauth.c,v 1.5.2.4 2005/02/20 19:07:45 hno Exp $
*
* * * * * * * * Legal stuff * * * * * * *
*
@@ -123,7 +123,7 @@
*/
const char *
ntlm_make_challenge(char *domain, char *domain_controller,
- char *challenge_nonce, int challenge_nonce_len)
+ unsigned char *challenge_nonce, int challenge_nonce_len)
{
ntlm_challenge ch;
int pl = 0;
diff -ruN squid-2.5.STABLE8/snmplib/Makefile.in squid-2.5.STABLE9/snmplib/Makefile.in
--- squid-2.5.STABLE8/snmplib/Makefile.in Sat Jul 10 06:11:48 2004
+++ squid-2.5.STABLE9/snmplib/Makefile.in Sun Feb 20 18:35:48 2005
@@ -169,7 +169,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/src/HttpHeader.c squid-2.5.STABLE9/src/HttpHeader.c
--- squid-2.5.STABLE8/src/HttpHeader.c Thu Feb 10 03:07:05 2005
+++ squid-2.5.STABLE9/src/HttpHeader.c Sun Feb 20 03:32:41 2005
@@ -1,6 +1,6 @@
/*
- * $Id: HttpHeader.c,v 1.74.2.24 2005/02/10 10:07:05 hno Exp $
+ * $Id: HttpHeader.c,v 1.74.2.25 2005/02/20 10:32:41 hno Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
@@ -439,13 +439,18 @@
}
/* Barf on stray CR characters */
if (memchr(this_line, '\r', field_end - this_line)) {
- debug(55, 1) ("WARNING: suspicious CR characters in HTTP header near {%s}\n",
- getStringPrefix(field_start, header_end));
- return httpHeaderReset(hdr);
+ debug(55, 1) ("WARNING: suspicious CR characters in HTTP header {%s}\n",
+ getStringPrefix(field_start, field_end));
+ if (Config.onoff.relaxed_header_parser) {
+ char *p = (char *) this_line; /* XXX Warning! This destroys original header content and violates specifications somewhat */
+ while ((p = memchr(p, '\r', field_end - p)) != NULL)
+ *p++ = ' ';
+ } else
+ return httpHeaderReset(hdr);
}
if (this_line + 1 == field_end && this_line > field_start) {
- debug(55, 1) ("WARNING: Blank continuation line in HTTP header near {%s}\n",
- getStringPrefix(field_start, header_end));
+ debug(55, 1) ("WARNING: Blank continuation line in HTTP header {%s}\n",
+ getStringPrefix(header_start, header_end));
return httpHeaderReset(hdr);
}
} while (field_ptr < header_end && (*field_ptr == ' ' || *field_ptr == '\t'));
@@ -459,13 +464,18 @@
}
e = httpHeaderEntryParseCreate(field_start, field_end);
if (NULL == e) {
- debug(55, 1) ("WARNING: unparseable HTTP header field near {%s}\n",
- getStringPrefix(field_start, header_end));
- return httpHeaderReset(hdr);
+ debug(55, 1) ("WARNING: unparseable HTTP header field {%s}\n",
+ getStringPrefix(field_start, field_end));
+ debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
+ (" in {%s}\n", getStringPrefix(header_start, header_end));
+ if (Config.onoff.relaxed_header_parser)
+ continue;
+ else
+ return httpHeaderReset(hdr);
}
if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) {
if (!Config.onoff.relaxed_header_parser || strCmp(e->value, strBuf(e2->value)) != 0) {
- debug(55, 1) ("WARNING: found two conflicting content-length headers\n");
+ debug(55, 1) ("WARNING: found two conflicting content-length headers in {%s}\n", getStringPrefix(header_start, header_end));
httpHeaderEntryDestroy(e);
return httpHeaderReset(hdr);
} else {
diff -ruN squid-2.5.STABLE8/src/acl.c squid-2.5.STABLE9/src/acl.c
--- squid-2.5.STABLE8/src/acl.c Mon Jan 10 08:31:00 2005
+++ squid-2.5.STABLE9/src/acl.c Sun Feb 20 12:07:45 2005
@@ -1,6 +1,6 @@
/*
- * $Id: acl.c,v 1.270.2.32 2005/01/10 15:31:00 hno Exp $
+ * $Id: acl.c,v 1.270.2.34 2005/02/20 19:07:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
@@ -2781,7 +2781,7 @@
#include
#endif
#include
-#ifdef _SQUID_FREEBSD__
+#ifdef _SQUID_FREEBSD_
#include
#endif
#if HAVE_NETINET_IF_ETHER_H
@@ -2856,7 +2856,7 @@
#if defined(_SQUID_LINUX_)
struct arpreq arpReq;
struct sockaddr_in ipAddr;
- unsigned char ifbuffer[sizeof(struct ifreq) * 64];
+ char ifbuffer[sizeof(struct ifreq) * 64];
struct ifconf ifc;
struct ifreq *ifr;
int offset;
@@ -2969,10 +2969,6 @@
#elif defined(_SQUID_SOLARIS_)
struct arpreq arpReq;
struct sockaddr_in ipAddr;
- unsigned char ifbuffer[sizeof(struct ifreq) * 64];
- struct ifconf ifc;
- struct ifreq *ifr;
- int offset;
splayNode **Top = dataptr;
/*
* Set up structures for ARP lookup with blank interface name
@@ -3007,10 +3003,6 @@
#elif defined(_SQUID_FREEBSD_)
struct arpreq arpReq;
struct sockaddr_in ipAddr;
- unsigned char ifbuffer[sizeof(struct ifreq) * 64];
- struct ifconf ifc;
- struct ifreq *ifr;
- int offset;
splayNode **Top = dataptr;
int mib[6];
diff -ruN squid-2.5.STABLE8/src/auth/Makefile.in squid-2.5.STABLE9/src/auth/Makefile.in
--- squid-2.5.STABLE8/src/auth/Makefile.in Sat Jul 10 06:11:49 2004
+++ squid-2.5.STABLE9/src/auth/Makefile.in Sun Feb 20 18:35:48 2005
@@ -15,7 +15,7 @@
# Makefile for authentication modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.6.2.9 2004/07/10 12:11:49 hno Exp $
+# $Id: Makefile.in,v 1.6.2.10 2005/02/21 01:35:48 hno Exp $
#
SHELL = @SHELL@
@@ -189,7 +189,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/src/auth/ntlm/auth_ntlm.h squid-2.5.STABLE9/src/auth/ntlm/auth_ntlm.h
--- squid-2.5.STABLE8/src/auth/ntlm/auth_ntlm.h Wed Aug 25 14:24:04 2004
+++ squid-2.5.STABLE9/src/auth/ntlm/auth_ntlm.h Sun Feb 20 12:07:46 2005
@@ -85,8 +85,4 @@
typedef struct _auth_ntlm_config auth_ntlm_config;
typedef struct _ntlm_challenge_hash_pointer ntlm_challenge_hash_pointer;
-extern MemPool *ntlm_helper_state_pool;
-extern MemPool *ntlm_user_pool;
-extern MemPool *ntlm_request_pool;
-
#endif
diff -ruN squid-2.5.STABLE8/src/cache_cf.c squid-2.5.STABLE9/src/cache_cf.c
--- squid-2.5.STABLE8/src/cache_cf.c Thu Feb 10 03:07:05 2005
+++ squid-2.5.STABLE9/src/cache_cf.c Sun Feb 20 19:55:04 2005
@@ -1,6 +1,6 @@
/*
- * $Id: cache_cf.c,v 1.396.2.19 2005/02/10 10:07:05 hno Exp $
+ * $Id: cache_cf.c,v 1.396.2.20 2005/02/21 02:55:04 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
@@ -1573,9 +1573,12 @@
while ((p = *P) != NULL) {
*P = p->next;
#if USE_CACHE_DIGESTS
- if (p->digest)
- cbdataUnlock(p->digest);
- p->digest = NULL;
+ if (p->digest) {
+ PeerDigest *pd = p->digest;
+ p->digest = NULL;
+ peerDigestNotePeerGone(pd);
+ cbdataUnlock(pd);
+ }
#endif
cbdataFree(p);
}
diff -ruN squid-2.5.STABLE8/src/carp.c squid-2.5.STABLE9/src/carp.c
--- squid-2.5.STABLE8/src/carp.c Thu Sep 30 03:23:30 2004
+++ squid-2.5.STABLE9/src/carp.c Sun Feb 13 13:54:09 2005
@@ -1,6 +1,6 @@
/*
- * $Id: carp.c,v 1.15.2.2 2004/09/30 09:23:30 hno Exp $
+ * $Id: carp.c,v 1.15.2.3 2005/02/13 20:54:09 serassio Exp $
*
* DEBUG: section 39 Cache Array Routing Protocol
* AUTHOR: Eric Stern
@@ -126,7 +126,7 @@
combined_hash += combined_hash * 0x62531965;
combined_hash = ROTATE_LEFT(combined_hash, 21);
combined_hash = combined_hash * tp->carp.load_multiplier;
- debug(39, 3) ("carpSelectParent: %s combined_hash %d\n",
+ debug(39, 3) ("carpSelectParent: %s combined_hash %ld\n",
tp->host, combined_hash);
if ((combined_hash > high_score) && neighborUp(tp)) {
p = tp;
diff -ruN squid-2.5.STABLE8/src/cf.data.pre squid-2.5.STABLE9/src/cf.data.pre
--- squid-2.5.STABLE8/src/cf.data.pre Thu Feb 10 03:07:05 2005
+++ squid-2.5.STABLE9/src/cf.data.pre Tue Feb 22 17:06:34 2005
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.245.2.84 2005/02/10 10:07:05 hno Exp $
+# $Id: cf.data.pre,v 1.245.2.85 2005/02/23 00:06:34 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -3247,6 +3247,17 @@
Note: This is in addition to the request reforwarding which
takes place if Squid fails to get a satisfying response.
+DOC_END
+
+NAME: retry_on_error
+TYPE: onoff
+LOC: Config.retry.onerror
+DEFAULT: off
+DOC_START
+ If set to on Squid will automatically retry requests when
+ receiving an error response. This is mainly useful if you
+ are in a complex cache hierarchy to work around access
+ control errors.
DOC_END
NAME: snmp_port
diff -ruN squid-2.5.STABLE8/src/client_side.c squid-2.5.STABLE9/src/client_side.c
--- squid-2.5.STABLE8/src/client_side.c Thu Feb 3 17:10:09 2005
+++ squid-2.5.STABLE9/src/client_side.c Sun Feb 20 12:07:45 2005
@@ -1,6 +1,6 @@
/*
- * $Id: client_side.c,v 1.561.2.70 2005/02/04 00:10:09 hno Exp $
+ * $Id: client_side.c,v 1.561.2.71 2005/02/20 19:07:45 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
@@ -3016,7 +3016,7 @@
/* Process next request */
while (conn->in.offset > 0 && conn->body.size_left == 0) {
int nrequests;
- size_t req_line_sz;
+ size_t req_line_sz = 0;
/* Skip leading (and trailing) whitespace */
while (conn->in.offset > 0 && xisspace(conn->in.buf[0])) {
xmemmove(conn->in.buf, conn->in.buf + 1, conn->in.offset - 1);
diff -ruN squid-2.5.STABLE8/src/comm.c squid-2.5.STABLE9/src/comm.c
--- squid-2.5.STABLE8/src/comm.c Mon Sep 27 12:17:39 2004
+++ squid-2.5.STABLE9/src/comm.c Sat Feb 12 22:53:56 2005
@@ -1,6 +1,6 @@
/*
- * $Id: comm.c,v 1.324.2.4 2004/09/27 18:17:39 hno Exp $
+ * $Id: comm.c,v 1.324.2.5 2005/02/13 05:53:56 hno Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
@@ -411,8 +411,6 @@
cs->S.sin_family = AF_INET;
cs->S.sin_addr = cs->in_addr;
cs->S.sin_port = htons(cs->port);
- if (Config.onoff.log_fqdn)
- fqdncache_gethostbyaddr(cs->S.sin_addr, FQDN_LOOKUP_IF_MISS);
}
switch (comm_connect_addr(fd, &cs->S)) {
case COMM_INPROGRESS:
diff -ruN squid-2.5.STABLE8/src/event.c squid-2.5.STABLE9/src/event.c
--- squid-2.5.STABLE8/src/event.c Sun Nov 10 07:17:24 2002
+++ squid-2.5.STABLE9/src/event.c Sun Feb 20 19:55:04 2005
@@ -1,6 +1,6 @@
/*
- * $Id: event.c,v 1.31.2.1 2002/11/10 14:17:24 hno Exp $
+ * $Id: event.c,v 1.31.2.2 2005/02/21 02:55:04 hno Exp $
*
* DEBUG: section 41 Event Processing
* AUTHOR: Henrik Nordstrom
@@ -147,6 +147,26 @@
func(arg);
}
memFree(event, MEM_EVENT);
+ }
+}
+
+void
+eventCleanup(void)
+{
+ struct ev_entry **p = &tasks;
+
+ debug(41, 0) ("eventCleanup\n");
+
+ while (*p) {
+ struct ev_entry *event = *p;
+ if (!cbdataValid(event->arg)) {
+ debug(41, 0) ("eventCleanup: cleaning '%s'\n", event->name);
+ *p = event->next;
+ cbdataUnlock(event->arg);
+ memFree(event, MEM_EVENT);
+ } else {
+ p = &event->next;
+ }
}
}
diff -ruN squid-2.5.STABLE8/src/external_acl.c squid-2.5.STABLE9/src/external_acl.c
--- squid-2.5.STABLE8/src/external_acl.c Sat Aug 14 15:01:33 2004
+++ squid-2.5.STABLE9/src/external_acl.c Sun Feb 20 04:02:56 2005
@@ -1,6 +1,6 @@
/*
- * $Id: external_acl.c,v 1.1.2.31 2004/08/14 21:01:33 hno Exp $
+ * $Id: external_acl.c,v 1.1.2.33 2005/02/20 11:02:56 hno Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -231,7 +231,7 @@
if (member) {
/* Split in header and member */
*member++ = '\0';
- if (!isalnum(*member))
+ if (!xisalnum(*member))
format->separator = *member++;
else
format->separator = ',';
diff -ruN squid-2.5.STABLE8/src/forward.c squid-2.5.STABLE9/src/forward.c
--- squid-2.5.STABLE8/src/forward.c Tue Oct 5 16:34:42 2004
+++ squid-2.5.STABLE9/src/forward.c Tue Feb 22 17:06:35 2005
@@ -1,6 +1,6 @@
/*
- * $Id: forward.c,v 1.82.2.13 2004/10/05 22:34:42 hno Exp $
+ * $Id: forward.c,v 1.82.2.14 2005/02/23 00:06:35 hno Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
@@ -837,13 +837,14 @@
fwdReforwardableStatus(http_status s)
{
switch (s) {
+ case HTTP_BAD_GATEWAY:
+ case HTTP_GATEWAY_TIMEOUT:
+ return 1;
case HTTP_FORBIDDEN:
case HTTP_INTERNAL_SERVER_ERROR:
case HTTP_NOT_IMPLEMENTED:
- case HTTP_BAD_GATEWAY:
case HTTP_SERVICE_UNAVAILABLE:
- case HTTP_GATEWAY_TIMEOUT:
- return 1;
+ return Config.retry.onerror;
default:
return 0;
}
diff -ruN squid-2.5.STABLE8/src/fqdncache.c squid-2.5.STABLE9/src/fqdncache.c
--- squid-2.5.STABLE8/src/fqdncache.c Tue Dec 7 16:40:57 2004
+++ squid-2.5.STABLE9/src/fqdncache.c Mon Feb 21 09:59:45 2005
@@ -1,6 +1,6 @@
/*
- * $Id: fqdncache.c,v 1.149.2.5 2004/12/07 23:40:57 hno Exp $
+ * $Id: fqdncache.c,v 1.149.2.7 2005/02/21 16:59:45 hno Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
@@ -303,14 +303,22 @@
continue;
if (answers[k].class != RFC1035_CLASS_IN)
continue;
- f->names[f->name_count++] = xstrndup(answers[k].rdata, answers[k].rdlength);
+ if (!answers[k].rdata[0]) {
+ debug(35, 2) ("fqdncacheParse: blank PTR record for '%s'\n", name);
+ continue;
+ }
+ if (strchr(answers[k].rdata, ' ')) {
+ debug(35, 2) ("fqdncacheParse: invalid PTR record '%s' for '%s'\n", answers[k].rdata, name);
+ continue;
+ }
+ f->names[f->name_count++] = xstrdup(answers[k].rdata);
if (ttl == 0 || answers[k].ttl < ttl)
ttl = answers[k].ttl;
if (f->name_count >= FQDN_MAX_NAMES)
break;
}
if (f->name_count == 0) {
- debug(35, 1) ("fqdncacheParse: No PTR record\n");
+ debug(35, 1) ("fqdncacheParse: No PTR record for '%s'\n", name);
f->error_message = xstrdup("No PTR record");
return f;
}
diff -ruN squid-2.5.STABLE8/src/fs/Makefile.in squid-2.5.STABLE9/src/fs/Makefile.in
--- squid-2.5.STABLE8/src/fs/Makefile.in Sat Jul 10 06:11:49 2004
+++ squid-2.5.STABLE9/src/fs/Makefile.in Sun Feb 20 18:35:49 2005
@@ -15,7 +15,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.8.2.10 2004/07/10 12:11:49 hno Exp $
+# $Id: Makefile.in,v 1.8.2.11 2005/02/21 01:35:49 hno Exp $
#
SHELL = @SHELL@
@@ -223,7 +223,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/src/ftp.c squid-2.5.STABLE9/src/ftp.c
--- squid-2.5.STABLE8/src/ftp.c Sat Feb 5 17:53:29 2005
+++ squid-2.5.STABLE9/src/ftp.c Sun Feb 20 20:35:08 2005
@@ -1,6 +1,6 @@
/*
- * $Id: ftp.c,v 1.316.2.17 2005/02/06 00:53:29 hno Exp $
+ * $Id: ftp.c,v 1.316.2.21 2005/02/21 03:35:08 hno Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
@@ -433,7 +433,8 @@
if (ftpState->flags.listformat_unknown && !ftpState->flags.tried_nlst) {
storeAppendPrintf(e, "[As plain directory]\n");
} else if (ftpState->typecode == 'D') {
- storeAppendPrintf(e, "[As extended directory]\n");
+ const char *path = ftpState->filepath ? ftpState->filepath : ".";
+ storeAppendPrintf(e, "[As extended directory]\n", html_quote(path));
}
storeAppendPrintf(e, "
\n");
storeAppendPrintf(e, "\n");
@@ -707,7 +708,7 @@
"Back");
} else { /* NO_DOTDOT && ROOT_DIR */
/* "UNIX Root" directory */
- strcpy(href, "../");
+ strcpy(href, "/");
strcpy(text, "Home Directory");
}
snprintf(html, 8192, "%s %s %s\n",
@@ -1011,20 +1012,18 @@
}
}
l = strLen(request->urlpath);
- ftpState->flags.use_base = 1;
/* check for null path */
if (!l) {
ftpState->flags.isdir = 1;
ftpState->flags.root_dir = 1;
+ ftpState->flags.use_base = 1; /* Work around broken browsers */
} else if (!strCmp(request->urlpath, "/%2f/")) {
/* UNIX root directory */
- ftpState->flags.use_base = 0;
ftpState->flags.isdir = 1;
ftpState->flags.root_dir = 1;
} else if ((l >= 1) && (*(strBuf(request->urlpath) + l - 1) == '/')) {
/* Directory URL, ending in / */
ftpState->flags.isdir = 1;
- ftpState->flags.use_base = 0;
if (l == 1)
ftpState->flags.root_dir = 1;
}
@@ -1046,6 +1045,12 @@
strCat(ftpState->title_url, xitoa(request->port));
}
strCat(ftpState->title_url, strBuf(request->urlpath));
+ {
+ char *t = xstrdup(strBuf(ftpState->title_url));
+ rfc1738_unescape(t);
+ stringReset(&ftpState->title_url, t);
+ xfree(t);
+ }
stringReset(&ftpState->base_href, "ftp://");
if (strcmp(ftpState->user, "anonymous")) {
@@ -1518,7 +1523,8 @@
if (*p)
*p++ = '\0';
rfc1738_unescape(d);
- wordlistAdd(&ftpState->pathcomps, d);
+ if (*d)
+ wordlistAdd(&ftpState->pathcomps, d);
}
xfree(path);
if (ftpState->pathcomps)
@@ -1569,10 +1575,7 @@
} else {
ftpState->flags.no_dotdot = 0;
}
- if (*path)
- snprintf(cbuf, 1024, "CWD %s\r\n", path);
- else
- snprintf(cbuf, 1024, "CWD\r\n");
+ snprintf(cbuf, 1024, "CWD %s\r\n", path);
ftpWriteCommand(cbuf, ftpState);
ftpState->state = SENT_CWD;
}
@@ -1645,7 +1648,6 @@
debug(9, 3) ("Directory path did not end in /\n");
strCat(ftpState->title_url, "/");
ftpState->flags.isdir = 1;
- ftpState->flags.use_base = 1;
}
ftpSendPasv(ftpState);
}
@@ -2010,7 +2012,6 @@
debug(9, 3) ("This is ftpRestOrList\n");
if (ftpState->typecode == 'D') {
ftpState->flags.isdir = 1;
- ftpState->flags.use_base = 1;
if (ftpState->flags.put) {
ftpSendMkdir(ftpState); /* PUT name;type=d */
} else {
@@ -2144,7 +2145,6 @@
{
ftpState->flags.tried_nlst = 1;
if (ftpState->filepath) {
- ftpState->flags.use_base = 1;
snprintf(cbuf, 1024, "NLST %s\r\n", ftpState->filepath);
} else {
snprintf(cbuf, 1024, "NLST\r\n");
diff -ruN squid-2.5.STABLE8/src/htcp.c squid-2.5.STABLE9/src/htcp.c
--- squid-2.5.STABLE8/src/htcp.c Wed Aug 6 07:49:01 2003
+++ squid-2.5.STABLE9/src/htcp.c Sun Feb 20 12:07:45 2005
@@ -1,6 +1,6 @@
/*
- * $Id: htcp.c,v 1.38.2.4 2003/08/06 13:49:01 hno Exp $
+ * $Id: htcp.c,v 1.38.2.5 2005/02/20 19:07:45 hno Exp $
*
* DEBUG: section 31 Hypertext Caching Protocol
* AUTHOR: Duane Wesssels
@@ -832,7 +832,7 @@
static char buf[8192];
int len;
static struct sockaddr_in from;
- int flen = sizeof(struct sockaddr_in);
+ socklen_t flen = sizeof(struct sockaddr_in);
memset(&from, '\0', flen);
statCounter.syscalls.sock.recvfroms++;
len = recvfrom(fd, buf, 8192, 0, (struct sockaddr *) &from, &flen);
diff -ruN squid-2.5.STABLE8/src/ipcache.c squid-2.5.STABLE9/src/ipcache.c
--- squid-2.5.STABLE8/src/ipcache.c Tue Dec 7 16:40:57 2004
+++ squid-2.5.STABLE9/src/ipcache.c Sat Feb 12 22:53:56 2005
@@ -1,6 +1,6 @@
/*
- * $Id: ipcache.c,v 1.236.2.5 2004/12/07 23:40:57 hno Exp $
+ * $Id: ipcache.c,v 1.236.2.6 2005/02/13 05:53:56 hno Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
@@ -338,6 +338,10 @@
continue;
if (answers[k].class != RFC1035_CLASS_IN)
continue;
+ if (answers[k].rdlength != 4) {
+ debug(14, 1) ("ipcacheParse: Invalid IP address in response to '%s'\n", name);
+ continue;
+ }
na++;
}
if (na == 0) {
@@ -353,9 +357,10 @@
continue;
if (answers[k].class != RFC1035_CLASS_IN)
continue;
+ if (answers[k].rdlength != 4)
+ continue;
if (ttl == 0 || ttl > answers[k].ttl)
ttl = answers[k].ttl;
- assert(answers[k].rdlength == 4);
xmemcpy(&i->addrs.in_addrs[j++], answers[k].rdata, 4);
debug(14, 3) ("ipcacheParse: #%d %s\n",
j - 1,
diff -ruN squid-2.5.STABLE8/src/main.c squid-2.5.STABLE9/src/main.c
--- squid-2.5.STABLE8/src/main.c Tue Dec 28 05:54:35 2004
+++ squid-2.5.STABLE9/src/main.c Sun Feb 20 19:55:04 2005
@@ -1,6 +1,6 @@
/*
- * $Id: main.c,v 1.345.2.15 2004/12/28 12:54:35 hno Exp $
+ * $Id: main.c,v 1.345.2.19 2005/02/21 02:55:04 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
@@ -390,6 +390,7 @@
}
storeDirOpenSwapLogs();
mimeInit(Config.mimeTablePathname);
+ eventCleanup();
writePidFile(); /* write PID file */
debug(1, 1) ("Ready to serve requests.\n");
reconfiguring = 0;
@@ -807,7 +808,7 @@
xstrncpy(&script[sl], squid_start_script, MAXPATHLEN - sl);
if ((cpid = fork()) == 0) {
/* child */
- execl(script, squid_start_script, 0);
+ execl(script, squid_start_script, NULL);
_exit(0);
} else {
do {
@@ -836,7 +837,7 @@
return 0;
if (kill(pid, 0) < 0)
return 0;
- debug(0, 0) ("Squid is already running! Process ID %d\n", pid);
+ debug(0, 0) ("Squid is already running! Process ID %ld\n", (long int) pid);
return 1;
}
@@ -853,7 +854,9 @@
int status;
#endif
pid_t pid;
+#ifdef TIOCNOTTY
int i;
+#endif
int nullfd;
if (*(argv[0]) == '(')
return;
diff -ruN squid-2.5.STABLE8/src/neighbors.c squid-2.5.STABLE9/src/neighbors.c
--- squid-2.5.STABLE8/src/neighbors.c Sat Nov 29 11:53:00 2003
+++ squid-2.5.STABLE9/src/neighbors.c Sun Feb 20 19:55:04 2005
@@ -1,6 +1,6 @@
/*
- * $Id: neighbors.c,v 1.299.2.4 2003/11/29 18:53:00 hno Exp $
+ * $Id: neighbors.c,v 1.299.2.5 2005/02/21 02:55:04 hno Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
@@ -961,6 +961,7 @@
safe_free(l->domain);
safe_free(l);
}
+ aclDestroyAccessList(&p->access);
safe_free(p->host);
#if USE_CACHE_DIGESTS
if (p->digest) {
diff -ruN squid-2.5.STABLE8/src/net_db.c squid-2.5.STABLE9/src/net_db.c
--- squid-2.5.STABLE8/src/net_db.c Thu Jan 2 16:21:57 2003
+++ squid-2.5.STABLE9/src/net_db.c Sun Feb 13 14:23:19 2005
@@ -1,6 +1,6 @@
/*
- * $Id: net_db.c,v 1.158.2.4 2003/01/02 23:21:57 wessels Exp $
+ * $Id: net_db.c,v 1.158.2.5 2005/02/13 21:23:19 serassio Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
@@ -621,7 +621,7 @@
}
debug(38, 3) ("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n",
nused, rec_sz, nused * rec_sz);
- debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen, ex->used);
+ debug(38, 3) ("netdbExchangeHandleReply: seen %ld, used %ld\n", (long int) ex->seen, (long int) ex->used);
if (EBIT_TEST(ex->e->flags, ENTRY_ABORTED)) {
debug(38, 3) ("netdbExchangeHandleReply: ENTRY_ABORTED\n");
netdbExchangeDone(ex);
diff -ruN squid-2.5.STABLE8/src/protos.h squid-2.5.STABLE9/src/protos.h
--- squid-2.5.STABLE8/src/protos.h Fri Jan 21 05:22:59 2005
+++ squid-2.5.STABLE9/src/protos.h Sun Feb 20 19:55:04 2005
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.420.2.26 2005/01/21 12:22:59 hno Exp $
+ * $Id: protos.h,v 1.420.2.27 2005/02/21 02:55:04 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -257,6 +257,7 @@
extern int eventNextTime(void);
extern void eventDelete(EVH * func, void *arg);
extern void eventInit(void);
+extern void eventCleanup(void);
extern void eventFreeMemory(void);
extern int eventFind(EVH *, void *);
diff -ruN squid-2.5.STABLE8/src/repl/Makefile.in squid-2.5.STABLE9/src/repl/Makefile.in
--- squid-2.5.STABLE8/src/repl/Makefile.in Sat Jul 10 06:11:50 2004
+++ squid-2.5.STABLE9/src/repl/Makefile.in Sun Feb 20 18:35:51 2005
@@ -15,7 +15,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.7.2.10 2004/07/10 12:11:50 hno Exp $
+# $Id: Makefile.in,v 1.7.2.11 2005/02/21 01:35:51 hno Exp $
#
SHELL = @SHELL@
@@ -186,7 +186,7 @@
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-AR = ar
+#AR = ar
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff -ruN squid-2.5.STABLE8/src/repl/heap/store_heap_replacement.c squid-2.5.STABLE9/src/repl/heap/store_heap_replacement.c
--- squid-2.5.STABLE8/src/repl/heap/store_heap_replacement.c Tue Oct 23 23:26:22 2001
+++ squid-2.5.STABLE9/src/repl/heap/store_heap_replacement.c Sun Feb 13 14:23:19 2005
@@ -1,6 +1,6 @@
/*
- * $Id: store_heap_replacement.c,v 1.7 2001/10/24 05:26:22 hno Exp $
+ * $Id: store_heap_replacement.c,v 1.7.2.1 2005/02/13 21:23:19 serassio Exp $
*
* DEBUG: section 20 Storage Manager Heap-based replacement
* AUTHOR: John Dilley
@@ -79,7 +79,7 @@
tie = 1.0 - exp((double) (e->lastref - squid_curtime) / 86400.0);
key = age + (double) e->refcount - tie;
debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: %s refcnt=%d lastref=%ld age=%f tie=%f -> %f\n",
- storeKeyText(e->hash.key), (int)e->refcount, e->lastref, age, tie, key);
+ storeKeyText(e->hash.key), (int) e->refcount, (long int) e->lastref, age, tie, key);
if (e->mem_obj && e->mem_obj->url)
debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: url=%s\n",
e->mem_obj->url);
@@ -115,7 +115,7 @@
double tie = (e->lastref > 1) ? (1.0 / e->lastref) : 1.0;
key = age + ((double) e->refcount / size) - tie;
debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: %s size=%f refcnt=%d lastref=%ld age=%f tie=%f -> %f\n",
- storeKeyText(e->hash.key), size, (int)e->refcount, e->lastref, age, tie, key);
+ storeKeyText(e->hash.key), size, (int) e->refcount, (long int) e->lastref, age, tie, key);
if (e->mem_obj && e->mem_obj->url)
debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: url=%s\n",
e->mem_obj->url);
diff -ruN squid-2.5.STABLE8/src/stat.c squid-2.5.STABLE9/src/stat.c
--- squid-2.5.STABLE8/src/stat.c Tue Dec 7 18:00:56 2004
+++ squid-2.5.STABLE9/src/stat.c Sun Feb 13 14:19:44 2005
@@ -1,6 +1,6 @@
/*
- * $Id: stat.c,v 1.351.2.11 2004/12/08 01:00:56 hno Exp $
+ * $Id: stat.c,v 1.351.2.12 2005/02/13 21:19:44 serassio Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
@@ -567,18 +567,18 @@
mp = mallinfo();
storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n",
appname);
- storeAppendPrintf(sentry, "\tTotal space in arena: %6d KB\n",
- mp.arena >> 10);
- storeAppendPrintf(sentry, "\tOrdinary blocks: %6d KB %6d blks\n",
- mp.uordblks >> 10, mp.ordblks);
- storeAppendPrintf(sentry, "\tSmall blocks: %6d KB %6d blks\n",
- mp.usmblks >> 10, mp.smblks);
- storeAppendPrintf(sentry, "\tHolding blocks: %6d KB %6d blks\n",
- mp.hblkhd >> 10, mp.hblks);
- storeAppendPrintf(sentry, "\tFree Small blocks: %6d KB\n",
- mp.fsmblks >> 10);
- storeAppendPrintf(sentry, "\tFree Ordinary blocks: %6d KB\n",
- mp.fordblks >> 10);
+ storeAppendPrintf(sentry, "\tTotal space in arena: %6ld KB\n",
+ (long int) mp.arena >> 10);
+ storeAppendPrintf(sentry, "\tOrdinary blocks: %6ld KB %6ld blks\n",
+ (long int) mp.uordblks >> 10, (long int) mp.ordblks);
+ storeAppendPrintf(sentry, "\tSmall blocks: %6ld KB %6ld blks\n",
+ (long int) mp.usmblks >> 10, (long int) mp.smblks);
+ storeAppendPrintf(sentry, "\tHolding blocks: %6ld KB %6ld blks\n",
+ (long int) mp.hblkhd >> 10, (long int) mp.hblks);
+ storeAppendPrintf(sentry, "\tFree Small blocks: %6ld KB\n",
+ (long int) mp.fsmblks >> 10);
+ storeAppendPrintf(sentry, "\tFree Ordinary blocks: %6ld KB\n",
+ (long int) mp.fordblks >> 10);
t = mp.uordblks + mp.usmblks + mp.hblkhd;
storeAppendPrintf(sentry, "\tTotal in use: %6d KB %d%%\n",
t >> 10, percent(t, mp.arena + mp.hblkhd));
diff -ruN squid-2.5.STABLE8/src/structs.h squid-2.5.STABLE9/src/structs.h
--- squid-2.5.STABLE8/src/structs.h Thu Feb 3 17:30:01 2005
+++ squid-2.5.STABLE9/src/structs.h Tue Feb 22 17:06:35 2005
@@ -1,6 +1,6 @@
/*
- * $Id: structs.h,v 1.408.2.36 2005/02/04 00:30:01 hno Exp $
+ * $Id: structs.h,v 1.408.2.37 2005/02/23 00:06:35 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -657,6 +657,7 @@
char *errorDirectory;
struct {
int maxtries;
+ int onerror;
} retry;
struct {
size_t limit;
diff -ruN squid-2.5.STABLE8/src/tools.c squid-2.5.STABLE9/src/tools.c
--- squid-2.5.STABLE8/src/tools.c Sat Aug 14 15:01:33 2004
+++ squid-2.5.STABLE9/src/tools.c Sun Feb 13 14:19:44 2005
@@ -1,6 +1,6 @@
/*
- * $Id: tools.c,v 1.213.2.10 2004/08/14 21:01:33 hno Exp $
+ * $Id: tools.c,v 1.213.2.11 2005/02/13 21:19:44 serassio Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
@@ -132,18 +132,18 @@
return;
mp = mallinfo();
fprintf(debug_log, "Memory usage for %s via mallinfo():\n", appname);
- fprintf(debug_log, "\ttotal space in arena: %6d KB\n",
- mp.arena >> 10);
- fprintf(debug_log, "\tOrdinary blocks: %6d KB %6d blks\n",
- mp.uordblks >> 10, mp.ordblks);
- fprintf(debug_log, "\tSmall blocks: %6d KB %6d blks\n",
- mp.usmblks >> 10, mp.smblks);
- fprintf(debug_log, "\tHolding blocks: %6d KB %6d blks\n",
- mp.hblkhd >> 10, mp.hblks);
- fprintf(debug_log, "\tFree Small blocks: %6d KB\n",
- mp.fsmblks >> 10);
- fprintf(debug_log, "\tFree Ordinary blocks: %6d KB\n",
- mp.fordblks >> 10);
+ fprintf(debug_log, "\ttotal space in arena: %6ld KB\n",
+ (long int) mp.arena >> 10);
+ fprintf(debug_log, "\tOrdinary blocks: %6ld KB %6ld blks\n",
+ (long int) mp.uordblks >> 10, (long int) mp.ordblks);
+ fprintf(debug_log, "\tSmall blocks: %6ld KB %6ld blks\n",
+ (long int) mp.usmblks >> 10, (long int) mp.smblks);
+ fprintf(debug_log, "\tHolding blocks: %6ld KB %6ld blks\n",
+ (long int) mp.hblkhd >> 10, (long int) mp.hblks);
+ fprintf(debug_log, "\tFree Small blocks: %6ld KB\n",
+ (long int) mp.fsmblks >> 10);
+ fprintf(debug_log, "\tFree Ordinary blocks: %6ld KB\n",
+ (long int) mp.fordblks >> 10);
t = mp.uordblks + mp.usmblks + mp.hblkhd;
fprintf(debug_log, "\tTotal in use: %6d KB %d%%\n",
t >> 10, percent(t, mp.arena));
diff -ruN squid-2.5.STABLE8/src/wccp.c squid-2.5.STABLE9/src/wccp.c
--- squid-2.5.STABLE8/src/wccp.c Fri Feb 4 04:38:15 2005
+++ squid-2.5.STABLE9/src/wccp.c Sun Feb 20 12:07:45 2005
@@ -1,6 +1,6 @@
/*
- * $Id: wccp.c,v 1.19.2.9 2005/02/04 11:38:15 hno Exp $
+ * $Id: wccp.c,v 1.19.2.10 2005/02/20 19:07:45 hno Exp $
*
* DEBUG: section 80 WCCP Support
* AUTHOR: Glenn Chisholm
@@ -123,7 +123,7 @@
{
u_short port = WCCP_PORT;
struct sockaddr_in router, local;
- int local_len, router_len;
+ socklen_t local_len, router_len;
debug(80, 5) ("wccpConnectionOpen: Called\n");
if (Config.Wccp.router.s_addr == any_addr.s_addr) {
debug(1, 1) ("WCCP Disabled.\n");