]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoUpdate bootstrap internal references to configure.in
Amos Jeffries [Sun, 5 Dec 2010 03:09:54 +0000 (16:09 +1300)] 
Update bootstrap internal references to configure.in

14 years agoRenamve configure.ac to match current autotools standards
Henrik Nordstrom [Sun, 5 Dec 2010 02:25:52 +0000 (03:25 +0100)] 
Renamve configure.ac to match current autotools standards

14 years agoMake bootstrap.sh use system default autotools versions instead of searching
Henrik Nordstrom [Sun, 5 Dec 2010 02:23:25 +0000 (03:23 +0100)] 
Make bootstrap.sh use system default autotools versions instead of searching

can be overridden on commandline if needed. See bootstrap.sh for details.

14 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Sun, 5 Dec 2010 00:25:25 +0000 (17:25 -0700)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Updated Kerberos header includes

Better heimdal support as new heimdal version have gssapi_krb5 header
files which were in the past only in older MIT releases available.

To use kerberos_ldap_group on freebsd config.test has to be changed as
FreeBSD installs additional packages in /usr/local.

On FreeBSD 7 the krb5.h file does not work with C++. Checks for it.

14 years agoUpdate autoconf to 2.68
Henrik Nordstrom [Sat, 4 Dec 2010 21:35:55 +0000 (22:35 +0100)] 
Update autoconf to 2.68

14 years agoAuthor: Dmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Amos Jeffries [Sat, 4 Dec 2010 13:11:43 +0000 (06:11 -0700)] 
Author: Dmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Bug 3099: Incorrect 412 on If-None-Match and If-Modified-Since

14 years agoFix many C/C++ ABI warnings
Amos Jeffries [Sat, 4 Dec 2010 13:10:19 +0000 (06:10 -0700)] 
Fix many C/C++ ABI warnings

14 years agoBug 3068: Actually make SwapDir capacity fields 64-bit.
Amos Jeffries [Sat, 4 Dec 2010 01:41:43 +0000 (18:41 -0700)] 
Bug 3068: Actually make SwapDir capacity fields 64-bit.

This one uses uint64_t instead of size_t. It's a bit wider reaching than
the earlier commit since much of the existing code used size_t.

14 years agoExperiment: file internal extern declaration for C/C++ crossover
Amos Jeffries [Sat, 4 Dec 2010 01:25:10 +0000 (18:25 -0700)] 
Experiment: file internal extern declaration for C/C++ crossover

14 years agoAvoid comm_read "!fd_table[fd].closing()" assertion after adaptation ACL check
Alex Rousskov [Fri, 3 Dec 2010 23:04:01 +0000 (16:04 -0700)] 
Avoid comm_read "!fd_table[fd].closing()" assertion after adaptation ACL check

The assertion was hit if Server fd was closed while we were checking
adaptation ACLs, and we have not been notified of the closure yet (because the
Adaptation::AccessCheck callback is not async while closure notification is).

14 years agoPolished HttpStateData::persistentConnStatus() code. No functionality changes.
Alex Rousskov [Fri, 3 Dec 2010 22:59:37 +0000 (15:59 -0700)] 
Polished HttpStateData::persistentConnStatus() code. No functionality changes.

Moved virginReply() call closer to the first virgin reply use. This will help
re-adding "did we parse the header yet" check if we ever need it again. It
also saves a couple of CPU cycles for some transactions.

14 years agoPolished HttpStateData::persistentConnStatus() code. No functionality changes.
Alex Rousskov [Fri, 3 Dec 2010 22:56:17 +0000 (15:56 -0700)] 
Polished HttpStateData::persistentConnStatus() code. No functionality changes.

Do not check for flags.headers_parsed. The removed check was:
 - misplaced: connection-related conditions such as eof must be checked first;
 - wasteful: we never call persistentConnStatus() unless we parsed headers.

Moreover, calling persistentConnStatus() before we parse headers would trigger
and assertion because the method uses virginReply() which does not exist until
the headers are parsed.

14 years agoFix malloc_statistics C++ linkages
Amos Jeffries [Fri, 3 Dec 2010 04:57:33 +0000 (17:57 +1300)] 
Fix malloc_statistics C++ linkages

14 years agoFixes instance hides CacheManager::instance errors
Amos Jeffries [Fri, 3 Dec 2010 03:38:34 +0000 (16:38 +1300)] 
Fixes instance hides CacheManager::instance errors

14 years agoDocument libcompat-squid overview
Amos Jeffries [Fri, 3 Dec 2010 03:32:41 +0000 (16:32 +1300)] 
Document libcompat-squid overview

14 years agoFix size obscures MemBlob::size warnings.
Amos Jeffries [Fri, 3 Dec 2010 01:56:04 +0000 (14:56 +1300)] 
Fix size obscures MemBlob::size warnings.

14 years agoAuthor: Stefan Fritsch <sf@sfritsch.de>
Alex Rousskov [Thu, 2 Dec 2010 23:33:27 +0000 (16:33 -0700)] 
Author: Stefan Fritsch <sf@sfritsch.de>
Bug 3096: Squid destroys CbDataList<DeferredRead> objects too late

When server download speed exceeds client download speed, Squid creates a
CbDataList<DeferredRead> object and associates a comm_close handler with it.
When the server kicks the deferred read, the comm_close handler is canceled.
This create/cancel sequence happens every time the server-side code wants to
read but has to wait for the client, which may happen hundreds of times per
second.

Before this change, those canceled comm_close handlers were not removed from
Comm until the end of the entire server transaction, possibly accumulating
thousands of CbDataList<DeferredRead> objects tied to the socket descriptor
via the canceled but still stored close handler.

comm_remove_close_handler now immediately removes canceled close handlers to
avoid their accumulation.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 2 Dec 2010 01:12:35 +0000 (18:12 -0700)] 
SourceFormat Enforcement

14 years agoClarify max-size cache_dir option
Henrik Nordstrom [Wed, 1 Dec 2010 08:54:33 +0000 (09:54 +0100)] 
Clarify max-size cache_dir option

14 years agoTry to fix compile problems on FreeBSD6.4
Christos Tsantilas [Wed, 1 Dec 2010 08:41:19 +0000 (10:41 +0200)] 
Try to fix compile problems on FreeBSD6.4

The X509_NAME_add_entry_by_txt on FreeBSD 6.4 declared as:
int X509_NAME_add_entry_by_txt(X509_NAME *,char *,int,unsigned char *,int,int,int);

The second argument declared as "char *".  Use a static char * variable to
avoid compile errors.

14 years agoPrevent "chmod: cannot access btlayer..." errors during build tests.
Alex Rousskov [Mon, 29 Nov 2010 23:12:27 +0000 (16:12 -0700)] 
Prevent "chmod: cannot access btlayer..." errors during build tests.

14 years agoAuthor: Various Translators
Amos Jeffries [Mon, 29 Nov 2010 11:01:34 +0000 (00:01 +1300)] 
Author: Various Translators
Translations Update auto-save

14 years agoPrevent memory leaks when Adaptation::AccessCheck callback ends the job.
Alex Rousskov [Sun, 28 Nov 2010 15:29:51 +0000 (08:29 -0700)] 
Prevent memory leaks when Adaptation::AccessCheck callback ends the job.

The AccessCheckCallbackWrapper is used in nonBlockingCheck() and is called
from the ACL code, using legacy function-based API.  If the job ends during
the callback processing, there are no AsyncCall wrappers to destroy the job
object. We now convert legacy to async call to enable proper wrapping and job
destruction.

These kind of job leaks are invisible to valgrind, but that is another bug.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 28 Nov 2010 01:15:27 +0000 (18:15 -0700)] 
SourceFormat Enforcement

14 years agocache_peer multicast TTL clarification
Amos Jeffries [Sat, 27 Nov 2010 23:15:46 +0000 (12:15 +1300)] 
cache_peer multicast TTL clarification

14 years agoPolicy: use USE_* from code wrappers and ENABLE_* for conditionals.
Amos Jeffries [Sat, 27 Nov 2010 06:44:33 +0000 (23:44 -0700)] 
Policy: use USE_* from code wrappers and ENABLE_* for conditionals.

Makes a few more of the build conditionals match our naming policy.
http://wiki.squid-cache.org/Squid3CodingGuidelines

Updates two code wrapper macros:
* CBDATA_DEBUG becomes USE_CBDATA_DEBUG
* DELAY_POOLS becomes USE_DELAY_POOLS

Updates USE_DELAY_POOLS automake conditional to ENABLE_DELAY_POOLS

TODO: There are more of these wrappers to be updated.

14 years agoRemove useless namespace semi-colons
Amos Jeffries [Sat, 27 Nov 2010 01:58:38 +0000 (18:58 -0700)] 
Remove useless namespace semi-colons

14 years agoSourceLayout: Comm Write cleanups
Amos Jeffries [Sat, 27 Nov 2010 01:46:22 +0000 (18:46 -0700)] 
SourceLayout: Comm Write cleanups

* creates namespace Comm.

* The comm_write() functions are moved into that scope as Comm::Write()
  and only accept AsyncCall now. Old wrapper functions are removed.

* commio_* functions are all moved to methods of a new Comm::IoCallback
  object. Which represents either a read or a write callback event
  waiting to happen. Old wrapper functions have been removed.

* The fdc_table of pending read and write callbacks has been moved into
  the Comm scope with (the name iocb_table) and should be considered private.
  For now the COMMIO_*_CB() macros are retained to produce a pointer to
  a callback object in this table.

* libcomm-listener.la has been renamed to libcomm.la

14 years agoSend HTTP/1.1 on CONNECT responses
Amos Jeffries [Fri, 26 Nov 2010 10:09:52 +0000 (23:09 +1300)] 
Send HTTP/1.1 on CONNECT responses

CONNECT seems to have been missed somehow in the 1.1 conversion.
This corrects the omission so the hard-coded CONNECT reply strings send
1.1 as well.

14 years agoAdded missing namespace to the std::find() call to make Sun's compiler happier.
Alex Rousskov [Fri, 26 Nov 2010 04:51:23 +0000 (21:51 -0700)] 
Added missing namespace to the std::find() call to make Sun's compiler happier.

14 years agoDo not hide Mgr::Forwarder::params name, avoid compiler warnings and confusion.
Alex Rousskov [Fri, 26 Nov 2010 00:13:51 +0000 (17:13 -0700)] 
Do not hide Mgr::Forwarder::params name, avoid compiler warnings and confusion.

14 years agoUse compile-time constant for the array size, to make more compilers happy.
Alex Rousskov [Thu, 25 Nov 2010 22:04:30 +0000 (15:04 -0700)] 
Use compile-time constant for the array size, to make more compilers happy.

14 years agoAuthor: Various Translators
Amos Jeffries [Wed, 24 Nov 2010 11:00:56 +0000 (00:00 +1300)] 
Author: Various Translators
Translations Update auto-save

14 years agoBug 3110: reply_body_max_size none dont work with x-forwarded-for
Amos Jeffries [Tue, 23 Nov 2010 00:32:53 +0000 (13:32 +1300)] 
Bug 3110: reply_body_max_size none dont work with x-forwarded-for

14 years agoUpdate release notes to list %err_code and %err_detail in new logformat codes
Christos Tsantilas [Mon, 22 Nov 2010 11:19:17 +0000 (13:19 +0200)] 
Update release notes to list %err_code and %err_detail in new logformat codes

14 years agoUpdate release notes to include the "Dynamic SSL Certificate Generation" feature
Christos Tsantilas [Mon, 22 Nov 2010 10:55:24 +0000 (12:55 +0200)] 
Update release notes to include the "Dynamic SSL Certificate Generation" feature

14 years agoBug 3059: Crash on digest auth headers with unknown nonce
Amos Jeffries [Mon, 22 Nov 2010 09:52:34 +0000 (22:52 +1300)] 
Bug 3059: Crash on digest auth headers with unknown nonce

14 years agofailure_notify is C++-only
Amos Jeffries [Sun, 21 Nov 2010 11:03:56 +0000 (00:03 +1300)] 
failure_notify is C++-only

The global function failure_notify is tightly type dependent.

This makes sure all code which uses it is C++ and wraps it away from any
situations where the symbol may be re-defined with a C definition.

As a side-effect the malloc tracing code is shuffled into its own file.

14 years agoPolicy enforcement: Remove config.h from .h and .cci files
Amos Jeffries [Sun, 21 Nov 2010 04:40:05 +0000 (21:40 -0700)] 
Policy enforcement: Remove config.h from .h and .cci files

14 years agoPolicy: Include config.h first in all .cc
Amos Jeffries [Sat, 20 Nov 2010 11:31:38 +0000 (04:31 -0700)] 
Policy: Include config.h first in all .cc

Also fixes a few unsafe function uses hidden by earlier lack of these
includes safety checks.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 20 Nov 2010 01:12:28 +0000 (18:12 -0700)] 
SourceFormat Enforcement

14 years agoFix cachemgr http_port config report hiding options
Amos Jeffries [Fri, 19 Nov 2010 12:04:58 +0000 (01:04 +1300)] 
Fix cachemgr http_port config report hiding options

14 years agotestHttpReply requires hash containers
Amos Jeffries [Fri, 19 Nov 2010 11:18:54 +0000 (00:18 +1300)] 
testHttpReply requires hash containers

14 years agoHTTP Compliance: do not forward TRACE with Max-Forwards: 0 after REQMOD
Alex Rousskov [Fri, 19 Nov 2010 02:10:21 +0000 (19:10 -0700)] 
HTTP Compliance: do not forward TRACE with Max-Forwards: 0 after REQMOD

Before the change, Max-Forwards request value was cached in
HttpRequest::max_forwards member. It was set once in
clientProcessRequest() function. This works fine as long as no request
adaptation is performed. Otherwise original HTTP request may be
replaced with adopted one in ClientHttpRequest::noteAdaptationAnswer()
method and max_forwards value is lost.

This change removes HttpRequest::max_forwards member and gets the value
directly from HttpHeader when needed. This adds another string-to-int
conversion for TRACE and OPTIONS requests, but those are rare, and we
save a little in the other, far more common cases by removing the
HttpRequest::max_forwards member.

Removed assertion from clientReplyContext::traceReply() since it is
called from a single place and the condition is checked right before
the call.

Co-Advisors test cases:
    test_case/rfc2616/maxForwardsZero-TRACE-asterisk
    test_case/rfc2616/maxForwardsZero-TRACE-absolute

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 19 Nov 2010 01:12:35 +0000 (18:12 -0700)] 
SourceFormat Enforcement

14 years agoMinor changes to allow squid compile with ssl enabled but ssl_crtd disabled
Christos Tsantilas [Thu, 18 Nov 2010 08:37:39 +0000 (10:37 +0200)] 
Minor changes to allow squid compile with ssl enabled but ssl_crtd disabled

14 years agorename ssl/ssl_support.cc -> ssl/support.cc and ssl/ssl_support.h to ssl/support.h
Christos Tsantilas [Thu, 18 Nov 2010 08:16:57 +0000 (10:16 +0200)] 
rename ssl/ssl_support.cc -> ssl/support.cc  and ssl/ssl_support.h to ssl/support.h

14 years agoAuthor: Alex Rousskov, Andrew Balabohin, Christos Tsantilas
Christos Tsantilas [Thu, 18 Nov 2010 08:01:53 +0000 (10:01 +0200)] 
Author: Alex Rousskov, Andrew Balabohin, Christos Tsantilas
Dynamic SSL certificate generartion

This patch implements dynamic SSL certificate generartion in Squid.When
used with SSL Bump, the feature allows Squid to dynamically
generate (using a configurable CA certificate) and cache SSL
certificates for the proxied hosts.

A description for this feature can be found at:
   http://wiki.squid-cache.org/Features/DynamicSslCert

A first version of the patch posted by Alex, some months before:
  http://www.squid-cache.org/mail-archive/squid-dev/201003/0201.html

Some words about the patch:

  * ssl related source files moved under the src/ssl directory

  * Introduce the TidyPointer class similar to std::auto_ptr, which implements
    a  pointer that deletes the object it points to when the pointer's owner
    or context is gone. It  is designed to avoid memory leaks  in the presence
    of exceptions and processing short cuts.

  * Implements ssl context cache to use with generated ssl contexts. The
    Ssl::LocalContextStorage class stores the hostname/ssl context pairs for
    a local listening address/port. The  Ssl::GlobalContextStorage class used
    to store Ssl::LocalContextStorages per local listening address and handles
    squid shutdown/configure/reconfigure

  * Ssl::Helper class implements the squid part of the ssl_crtd helpers.

  * The ssl_crtd helper implemented in ssl_crtd.cc and certificate_db.* files

  * The Ssl::CertificateDb class (certificate_db.* files)  implements  a
    database of certificates on disk files. It is used by ssl_crtd helper to
    manipulate generated certificates.

  * The ssl related files included in the libraries libsslutil.a which
    contains common classes and functions and the libsquidssl.a which has
    squid related ssl objects and functions

  * Use the Ssl namespace for new ssl code

This is a Measurement Factory Project.

14 years agoAuthor: Various Translators
Amos Jeffries [Wed, 17 Nov 2010 23:01:38 +0000 (12:01 +1300)] 
Author: Various Translators
Translations Update auto-save

14 years agoPolish logformat documentation
Amos Jeffries [Wed, 17 Nov 2010 04:45:35 +0000 (17:45 +1300)] 
Polish logformat documentation

14 years agoConfig documentation typos
Amos Jeffries [Tue, 16 Nov 2010 12:44:13 +0000 (05:44 -0700)] 
Config documentation typos

14 years agoPolish loadable modules startup message.
Amos Jeffries [Tue, 16 Nov 2010 10:49:23 +0000 (03:49 -0700)] 
Polish loadable modules startup message.

14 years agoObsolete log_fqdn directive
Amos Jeffries [Tue, 16 Nov 2010 05:54:47 +0000 (18:54 +1300)] 
Obsolete log_fqdn directive

It has been informally deprecated for a while now, the %>A logformat
equivalent turns the global config setting on automatically on sight.

14 years agoReduce debug level on bodypipe re-write change
Amos Jeffries [Tue, 16 Nov 2010 05:43:47 +0000 (18:43 +1300)] 
Reduce debug level on bodypipe re-write change

- the original reason for adding is unknown
- it is an annoyance for some
- there have been no big problems tracked down to this bodypipe change
  over the last few years. It appears relatively harmless.

14 years agoDocumentation gramar:
Amos Jeffries [Mon, 15 Nov 2010 22:58:59 +0000 (11:58 +1300)] 
Documentation gramar:

14 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Mon, 15 Nov 2010 09:40:48 +0000 (22:40 +1300)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Fix 'declaration of 'dup' shadows a global' errors.

14 years agoAuthor: Various Translators
Amos Jeffries [Thu, 11 Nov 2010 17:01:49 +0000 (06:01 +1300)] 
Author: Various Translators
Translations Update auto-save

14 years agoAdded missing status phrase to some 304 (Not Modified) replies.
Alex Rousskov [Thu, 11 Nov 2010 15:46:07 +0000 (08:46 -0700)] 
Added missing status phrase to some 304 (Not Modified) replies.

The bug affected 304 hits, at least.

14 years agoext_edirectory_acl: min() template requires identical type. cast to size_t
Amos Jeffries [Wed, 10 Nov 2010 11:49:28 +0000 (00:49 +1300)] 
ext_edirectory_acl: min() template requires identical type. cast to size_t

14 years agoPolicy: detect config.h and squid.h include problems
Amos Jeffries [Wed, 10 Nov 2010 09:50:38 +0000 (22:50 +1300)] 
Policy: detect config.h and squid.h include problems

We currently have a policy that config.h MUST be included first so as to
pull in the portability definitions early. It MAY be included via the
legacy squid.h at present.

This alteration to the source maintenance script validates that each .c
and .cc file in the sources includes config.h or squid.h first in its
include order. Also that each .h and .cci do not include config.h which
is a double include with enforced .c/.cc requirement.

 * an ERROR: line is produces for each violating file
 * as yet the maintenance run is not blocked so as to catch as many
   errors as possible in one run
 * detection only, as yet no code alterations are performed by this script
 * FORMAT: informative lines are silenced to make ERROR: more visible

14 years agoDist missing opensolaris portability header
Amos Jeffries [Tue, 9 Nov 2010 20:38:04 +0000 (09:38 +1300)] 
Dist missing opensolaris portability header

14 years agoPartial revert r11017 (incorrect strncpy changes)
Amos Jeffries [Tue, 9 Nov 2010 05:24:53 +0000 (22:24 -0700)] 
Partial revert r11017 (incorrect strncpy changes)

Also a few other strncpy overflows and some memset() incorrect use.

14 years agoChangeLog update
Amos Jeffries [Sun, 7 Nov 2010 07:10:11 +0000 (01:10 -0600)] 
ChangeLog update

14 years agoSolaris: base system lacks paths.h system definitions
Amos Jeffries [Sun, 7 Nov 2010 05:26:48 +0000 (23:26 -0600)] 
Solaris: base system lacks paths.h system definitions

14 years agoBug 3091 fix: Bypassed ICAP errors are not counted as service failures.
Alex Rousskov [Sun, 7 Nov 2010 03:07:29 +0000 (21:07 -0600)] 
Bug 3091 fix: Bypassed ICAP errors are not counted as service failures.

Notify ICAP service about the failure even if we can bypass it. Otherwise,
a failing service may continue to stay "up", preventing Squid from using a
healthy backup alternative in a service_set (or bypassing ICAP completeley).

14 years agoext_edirectory_userip_acl: fix uninitialized pointer free
Amos Jeffries [Sun, 7 Nov 2010 01:01:54 +0000 (19:01 -0600)] 
ext_edirectory_userip_acl: fix uninitialized pointer free

14 years agoCheck for ldap_start_tls_s
Amos Jeffries [Sat, 6 Nov 2010 23:34:12 +0000 (17:34 -0600)] 
Check for ldap_start_tls_s

14 years agoFix tabbing and WS indentation of src/Makefile
Amos Jeffries [Sat, 6 Nov 2010 14:58:44 +0000 (08:58 -0600)] 
Fix tabbing and WS indentation of src/Makefile

14 years agoPortability fixes for ext_edirectory_userip_acl Solaris builds
Amos Jeffries [Sat, 6 Nov 2010 04:28:11 +0000 (17:28 +1300)] 
Portability fixes for ext_edirectory_userip_acl Solaris builds

 - bcmp() function is obsolete. use memcmp() instead
 - Kerberos is not supported by LDAP_AUTH_*

14 years agoPrep for 3.2.0.3
Amos Jeffries [Sat, 6 Nov 2010 02:43:02 +0000 (15:43 +1300)] 
Prep for 3.2.0.3

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 6 Nov 2010 00:12:25 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoUpdate translation files
Amos Jeffries [Fri, 5 Nov 2010 14:34:43 +0000 (03:34 +1300)] 
Update translation files

14 years agoAvoid a lot of bufer overruns in ext_edirectory_userip_acl
Amos Jeffries [Fri, 5 Nov 2010 12:47:05 +0000 (01:47 +1300)] 
Avoid a lot of bufer overruns in ext_edirectory_userip_acl

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 4 Nov 2010 00:12:17 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoFixed DNS query leaks and increased defense against DNS cache poisoning.
Christos Tsantilas [Wed, 3 Nov 2010 16:32:59 +0000 (18:32 +0200)] 
Fixed DNS query leaks and increased defense against DNS cache poisoning.

We were leaking (i.e. forgetting about) DNS queries under several conditions.
The most realistic leak case would go like this:

  - We send UDP query1.
    No response.

  - We send UDP query2.
    The response for query1 comes, with TC bit.

  - We try to connect over TCP, sending TCP query3.
    The response for query2 comes, with TC bit, matching TCP query3 ID.
    Since we are waiting a response over TCP, we drop the UDP response,
    and delete the query from the queue. We leak.

This change avoids forgetting the query under the above scenario.

Moreover, the above steps are hiding another problem: we are accepting responses
to timed out queries, making DNS cache poisoning easier. This change avoids
that by using unique query ID for each sent query. We have also added an
instance ID so that we still can track/identify a single "transaction" from
Squid point of view, even when that transaction involves many DNS query
messages.

When we forget about a DNS query, the caller may get stuck, holding a cbdata
lock. This is typical for ACLs that require domain name resolution, for example.
On a busy server with a long ACL list, the lock counter keeps growing due to
forgotten requests and may overflow, causing a "c->locks < 65535" assertion.
This change fixes the assertion unless there are more DNS leaks or different
lock leaks present.

This is a Measurement Factory project.

14 years agoThe cbdataReference/cbdataReferenceDone of ClientInfo::quotaQueue member
Christos Tsantilas [Wed, 3 Nov 2010 16:28:34 +0000 (18:28 +0200)] 
The cbdataReference/cbdataReferenceDone of ClientInfo::quotaQueue member
does not required for ClientInfo class internal use

Related squid-dev discussion:
      http://www.mail-archive.com/squid-dev@squid-cache.org/msg14280.html

14 years agoAdded debugging to the "client-max-age = 0 and ignore-reload" freshness check.
Alex Rousskov [Wed, 3 Nov 2010 16:10:13 +0000 (10:10 -0600)] 
Added debugging to the "client-max-age = 0 and ignore-reload" freshness check.

14 years agoHTTP Compliance: entry is stale if request has max-age=0.
Alex Rousskov [Tue, 2 Nov 2010 21:58:24 +0000 (15:58 -0600)] 
HTTP Compliance: entry is stale if request has max-age=0.

We should always do validation for requests with Cache-Control max-age=0,
even when entry age is also zero. In our case, RFC 2616 says:

    freshness_lifetime = max_age_value
    response_is_fresh = (freshness_lifetime > current_age)

and response_is_fresh is always false if freshness_lifetime is zero.

The check code was introduced in r5998 with a "Import of fix-ranges
branch" message. The code was commented out at the time of that
commit, for reasons unknown.

Test case:
    test_case/rfc2616/noSrv-hit-stale-max-age-req

14 years agoC++ fixes for ext_edirectory_userip_acl
Amos Jeffries [Tue, 2 Nov 2010 12:16:02 +0000 (01:16 +1300)] 
C++ fixes for ext_edirectory_userip_acl

14 years agoAuthor: Various Translators
Amos Jeffries [Tue, 2 Nov 2010 11:01:37 +0000 (00:01 +1300)] 
Author: Various Translators
Translations Update auto-save

14 years agoBug 3092: basic_sasl_auth needs libmiscencoding
Amos Jeffries [Tue, 2 Nov 2010 02:47:34 +0000 (20:47 -0600)] 
Bug 3092: basic_sasl_auth needs libmiscencoding

14 years agoCorrect ESI processing condition. Need to look for parsed header, not the header...
Henrik Nordstrom [Tue, 2 Nov 2010 01:03:15 +0000 (02:03 +0100)] 
Correct ESI processing condition. Need to look for parsed header, not the header mask (filtered)

14 years agoFix Surrogate-Control header parser of name=value tags.
Henrik Nordstrom [Tue, 2 Nov 2010 00:49:51 +0000 (01:49 +0100)] 
Fix Surrogate-Control header parser of name=value tags.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 2 Nov 2010 00:12:43 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agobasic_smb_auth needs libmiscencoding.la
Henrik Nordstrom [Mon, 1 Nov 2010 23:54:02 +0000 (00:54 +0100)] 
basic_smb_auth needs libmiscencoding.la

14 years agoReverted r11002 after r11003 added a more general safe_free() fix.
Alex Rousskov [Mon, 1 Nov 2010 20:55:47 +0000 (14:55 -0600)] 
Reverted r11002 after r11003 added a more general safe_free() fix.

14 years agoChanged safe_free() definition to eliminate multiple "ambiguous else" warnings.
Alex Rousskov [Mon, 1 Nov 2010 20:45:08 +0000 (14:45 -0600)] 
Changed safe_free() definition to eliminate multiple "ambiguous else" warnings.

14 years agoAdded explicit braces to avoid "ambiguous else" warning with GCC v4.4.1.
Alex Rousskov [Mon, 1 Nov 2010 20:23:56 +0000 (14:23 -0600)] 
Added explicit braces to avoid "ambiguous else" warning with GCC v4.4.1.

14 years agoCompile fixes from CentOS
Amos Jeffries [Mon, 1 Nov 2010 10:13:56 +0000 (04:13 -0600)] 
Compile fixes from CentOS

14 years agoBug 3038: Detatch libmisc from libcompat
Amos Jeffries [Mon, 1 Nov 2010 05:44:28 +0000 (23:44 -0600)] 
Bug 3038: Detatch libmisc from libcompat

* Migrates many of the remaining libmisc portability wrappers into
  libcompat.

* Splits libmisc into:
   libprofiler - Squid internal profiler (developer-only)
   libmiscencoding - Various binary encoding / crypto algorithms
   libmisccontainers - Various data container algorithms

* Makes all binaries which need to link the libmisc* pieces directly instead
  of via $(COMPAT_LIB) which now only links the libcompat and internal
  profiler due to profiling being used on some libcompat functions.

* Adds a stub_debug for binaries needing the Debug.h API without squid
  timers and globals.

Some effort has been made to identify binaries whose dependencies can be
reduced. More of this dependency removal can be done in future.

14 years agoSupport RFC 2965 Set-Cookie2 / Cookie2 headers
Amos Jeffries [Mon, 1 Nov 2010 00:52:59 +0000 (18:52 -0600)] 
Support RFC 2965 Set-Cookie2 / Cookie2 headers

14 years agoHarden quoted-string parser to RFC requirements
Amos Jeffries [Mon, 1 Nov 2010 00:21:57 +0000 (18:21 -0600)] 
Harden quoted-string parser to RFC requirements

Fix RFC 2616 section 2.2 quote-string handling.

 * Restrict the parser to the known length of the value string to prevent
   buffer over-reads from specially crafted inputs.
 * Drop quoted-string values containing CTL octets.

14 years agoMove client delay pools release notes to 3.2
Amos Jeffries [Fri, 29 Oct 2010 03:26:33 +0000 (21:26 -0600)] 
Move client delay pools release notes to 3.2

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 29 Oct 2010 00:12:28 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoUse the new Cache Manager registration API for the newly added /dev/poll code.
Alex Rousskov [Thu, 28 Oct 2010 20:01:27 +0000 (14:01 -0600)] 
Use the new Cache Manager registration API for the newly added /dev/poll code.

14 years agoSMP Cache Manager, Phase2 implementation.
Alex Rousskov [Thu, 28 Oct 2010 18:52:59 +0000 (12:52 -0600)] 
SMP Cache Manager, Phase2 implementation.

Cache Manager actions are forwarded to Coordinator. Coordinator iterates over
Kids, aggregating their stats if possible and/or allowing each kid to dump
non-aggregatable output directly into response if needed. Non-aggregated
output is wrapped in "by kidN { ... } by kidN" markup to ease auto-processing.

Regressions and small output formatting changes are probably unavoidable
because stats are aggregated and passed around as doubles instead of integers
(no more overflows though!) and because many stats collection and formatting
lines had to be touched. These are steps in the right direction though, IMO.

Old code both computed and dumped stats to Store at the same time. To avoid
computing code duplication, we now collect stats in primitive Stats objects
and then either dump those to Store or send them to Coordinator for
aggregation and, eventual Store dump. What stats to collect, when to
aggregate, and when to dump is decided by action-specific Mgr::Action classes.

The Cache Manager menu now consists of ActionProfile objects. ActionProfile
maintains hard-coded information about specific actions. It uses ActionCreator
member to create Action objects when a cache manager request is received.

Added Mgr::ActionParams class to maintain action parameters, including HTTP
request details necessary for Store entry creation (in another strand) and
action-specific parameters (currently just credentials). In Phase3, this class
can be extended to supply more parameters such as kid IDs to which the action
should apply.

Added Mgr::Command that combines hard-coded ActionProfile details with
user-specified ActionParams. This simplifies many interfaces because we no
longer need to supply a long list of parameters, covering various parts of
action config.

Moved Cache Manager registration to Mgr::RegisterAction() globals to reduce
dependency on the CacheManager class, which is a singleton anyway, and which
is unused by most of the registration callers.  On the other hand, without
this change, no legacy (function-based actions) code would have been changed!

Enhanced TypedMsgHdr class to simplify storing and loading non-POD classes.
The caller can now easily handle a non-POD class as a series of put/get calls,
one for each POD member. This was necessary to send Mgr::ActionParams to
Coordinator and back. Will probably be useful for sending other complex
structures as well.

Reconfigure, shutdown, and other "basic" actions have been moved to
src/mgr/BasicActions.cc. Mgr::RegisterBasics() registers them.

Most of the Cache Manager code is now in src/mgr/.

Many more polishing touches.

More polishing left for future projects: Move CacheManager to Mgr namespace
and src/mgr/ directory. Use SBuf instead of String for ActionParams and
TypedMsgHdr. Rename Ipc::TypedMsgHdr to Ipc::Msg, Ipc::SocketMsg, or similar
because it maintains more than just msghdr struct. More stats aggregation,
and Phase3 changes.

14 years agoPortability fix: u_int*_t types are deprecated, replaced with uint*_t
Francesco Chemolli [Thu, 28 Oct 2010 15:50:51 +0000 (17:50 +0200)] 
Portability fix: u_int*_t types are deprecated, replaced with uint*_t

14 years agoAdded ERR_PRECONDITION_FAILED template that I missed in r10990 commit.
Alex Rousskov [Thu, 28 Oct 2010 14:20:39 +0000 (08:20 -0600)] 
Added ERR_PRECONDITION_FAILED template that I missed in r10990 commit.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 28 Oct 2010 00:17:18 +0000 (18:17 -0600)] 
SourceFormat Enforcement

14 years agoHTTP Compliance: Support If-Match and If-None-Match requests.
Alex Rousskov [Wed, 27 Oct 2010 23:29:55 +0000 (17:29 -0600)] 
HTTP Compliance: Support If-Match and If-None-Match requests.

Add support for If-Match and If-None-Match headers as described in RFC 2616
(sections 14.24 and 14.26 in particular).

Moved IMS handling from clientReplyContext::cacheHit() to
clientReplyContext::processConditional() while preserving the original IMS
logic, except for the case when a request has both IMS and If-None-Match.

Co-Advisors test cases:
    test_clause/rfc2616/ifMatch-mismatch-strong
    test_clause/rfc2616/ifMatch-mismatch-weak
    test_clause/rfc2616/ifNoneMatch-match-imsNone
    and many more