]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
15 years agoMerge from trunk
Amos Jeffries [Thu, 9 Apr 2009 13:34:17 +0000 (01:34 +1200)] 
Merge from trunk

15 years agoPrep for 3.1.0.7
Amos Jeffries [Wed, 8 Apr 2009 10:34:45 +0000 (22:34 +1200)] 
Prep for 3.1.0.7

15 years agoHTTP 1.1: Forward OPTIONS requests properly
Amos Jeffries [Wed, 8 Apr 2009 10:01:57 +0000 (22:01 +1200)] 
HTTP 1.1: Forward OPTIONS requests properly

Bump the max_forwards type to 64-bit to cope with wider range of values.

NP: still no internal handling of OPTIONS requests, but this will
    forward them according to RFC 2616 requirements.

15 years agoMinor cleanup
Amos Jeffries [Tue, 7 Apr 2009 14:44:34 +0000 (02:44 +1200)] 
Minor cleanup

15 years agoAuthor: Source maintenance
Amos Jeffries [Tue, 7 Apr 2009 13:51:57 +0000 (01:51 +1200)] 
Author: Source maintenance
Source Format enforcement

15 years agoReal quiet cache.log when TPROXY and NAT both active
Amos Jeffries [Mon, 6 Apr 2009 13:33:04 +0000 (01:33 +1200)] 
Real quiet cache.log when TPROXY and NAT both active

15 years agoFubar. remove r9617
Amos Jeffries [Mon, 6 Apr 2009 13:22:42 +0000 (01:22 +1200)] 
Fubar. remove r9617

15 years agoQuiet cache.log when TPROXY and NAT both active
Amos Jeffries [Mon, 6 Apr 2009 12:59:32 +0000 (00:59 +1200)] 
Quiet cache.log when TPROXY and NAT both active

15 years agoWindows port: Added a note about installation on Windows Vista and later
Guido Serassio [Sat, 4 Apr 2009 15:34:12 +0000 (17:34 +0200)] 
Windows port: Added a note about installation on Windows Vista and later

15 years agoThe debug mode option '-d' was not documented in LDAP helpers usage message
Guido Serassio [Sat, 4 Apr 2009 09:58:40 +0000 (11:58 +0200)] 
The debug mode option '-d' was not documented in LDAP helpers usage message

15 years agoPurge last remnants of inet_ntoa
Amos Jeffries [Wed, 1 Apr 2009 11:49:17 +0000 (00:49 +1300)] 
Purge last remnants of inet_ntoa

 - Now fully replaced by IPAddress::NtoA and inet_ntop()
 - No need for the third-party emulator and license either

15 years agoCurrently the fs related subsystem is broken in trunk, because of
Christos Tsantilas [Tue, 31 Mar 2009 20:33:48 +0000 (23:33 +0300)] 
Currently the fs related subsystem is broken in trunk, because of
linking problems. This patch:
 - Add the files fs/Module.cc,h which are similar to esi/Module.* files
 - Build a new library libfs.a
 - The  fs/aufs/StoreFSaufs.cc, fs/diskd/StoreFSdiskd.cc and
   fs/ufs/StoreFSufs.cc now contain just fake pointers
 - The FS::Init() method used to build  ufs, aufs and diskd filesystems.
 - The FS::Init method called in main.cc before the code which reads the
   config files. The FS::clean() currently does not used.
 - The coss file system initiated using the old way.

15 years agoAutoDocs: Upgrade to 1.5.8 and fix many doc errors.
Amos Jeffries [Tue, 31 Mar 2009 12:39:30 +0000 (00:39 +1200)] 
AutoDocs: Upgrade to 1.5.8 and fix many doc errors.

Biggest change to note is a cleaner way to do lists of items in function
docs as follows:

/** blah blah:
 *  - foo
 *  - fu
 *  - fish
 */

15 years agoDisable HERE prefix calculation heuristic if it does not work instead of
Alex Rousskov [Mon, 30 Mar 2009 03:11:26 +0000 (21:11 -0600)] 
Disable HERE prefix calculation heuristic if it does not work instead of
asserting that the heuristic always works (it does not).

Polished comments.

More work needed to come up with a better heuristic.

15 years agoPolich Intercept code.
Amos Jeffries [Mon, 30 Mar 2009 02:13:10 +0000 (20:13 -0600)] 
Polich Intercept code.

 - cleans up some obscurity over data source and sink for me/client IPs.
 - cleans up existing debugs
 - adds new debugs to show NAT inputs and results at level-5
   (non-result is common and left at level-9)
 - adds new dbugs to show TPROXY result at level-5 like NAT results

15 years agoWindows port: Modified the base registry key tree
Guido Serassio [Sun, 29 Mar 2009 10:43:40 +0000 (12:43 +0200)] 
Windows port: Modified the base registry key tree

15 years agoWindows port: Added support for Windows 7, Windows Server 2008 R2 and later
Guido Serassio [Sun, 29 Mar 2009 10:36:30 +0000 (12:36 +0200)] 
Windows port: Added support for Windows 7, Windows Server 2008 R2 and later

15 years agoWindows port: Fix PSAPI.DLL usage, is always available on Windows NT and later
Guido Serassio [Sun, 29 Mar 2009 10:26:35 +0000 (12:26 +0200)] 
Windows port: Fix PSAPI.DLL usage, is always available on Windows NT and later

15 years agoFix build error in IpfInterception()
Amos Jeffries [Sun, 29 Mar 2009 07:13:39 +0000 (20:13 +1300)] 
Fix build error in IpfInterception()

15 years agoAdd to the squid binary dependecies the snmplib, the adaptation lib, the
Christos Tsantilas [Sat, 28 Mar 2009 17:41:32 +0000 (19:41 +0200)] 
Add to the squid binary dependecies the snmplib, the adaptation lib, the
esi lib and the common libs to force the squid binary rebuild when
one or more of the above libraries are changed

15 years agoIn ACLFilledChecklist::ACLFilledChecklist constructor the HttpRequest
Christos Tsantilas [Sat, 28 Mar 2009 16:39:14 +0000 (18:39 +0200)] 
In ACLFilledChecklist::ACLFilledChecklist constructor the HttpRequest
parameter hides the ACLFilledChecklist::request member.
As a result acl's do not work at all and some cases squid crashes
(eg when dstdomain acls used)

15 years agoImporing the AuthReg.cc file. This file is a hack to force required
Christos Tsantilas [Sat, 28 Mar 2009 08:52:55 +0000 (10:52 +0200)] 
Imporing the AuthReg.cc file. This file is a hack to force required
libraries and object files under the auth/* included in main squid
executable.

15 years agoRemove distcheck again. accidentally slipped in
Amos Jeffries [Fri, 27 Mar 2009 22:52:16 +0000 (11:52 +1300)] 
Remove distcheck again. accidentally slipped in

15 years agoFix: global flag is reconfiguring not restarting
Amos Jeffries [Fri, 27 Mar 2009 22:34:55 +0000 (11:34 +1300)] 
Fix: global flag is reconfiguring not restarting

15 years agoBug 2518: assertion failed: comm.cc:1519: "F->flags.open"
Amos Jeffries [Fri, 27 Mar 2009 22:29:32 +0000 (11:29 +1300)] 
Bug 2518: assertion failed: comm.cc:1519: "F->flags.open"

Not seen in a while. I suspect its hiding behind a fixed F->closing()
test, so the whole if test may be obsolete.

Applying in order to close the bug with surety and sync the conditions on
shutdown and restart-closing.

15 years agoFix ident errors. Not all USE_ macros are #ifdef
Amos Jeffries [Fri, 27 Mar 2009 08:20:57 +0000 (21:20 +1300)] 
Fix ident errors. Not all USE_ macros are #ifdef

15 years agoAuthor: Francesco Chemolli <kinkie@squid-cache.org>
Amos Jeffries [Fri, 27 Mar 2009 03:57:33 +0000 (16:57 +1300)] 
Author: Francesco Chemolli <kinkie@squid-cache.org>
Bug 1868: bad HTTP 207 status string

15 years agoAdded Multi-Status header string.
Francesco Chemolli [Thu, 26 Mar 2009 15:25:54 +0000 (16:25 +0100)] 
Added Multi-Status header string.

15 years agoTestBed: Add various undefined errors to reported
Amos Jeffries [Thu, 26 Mar 2009 13:11:51 +0000 (07:11 -0600)] 
TestBed: Add various undefined errors to reported

15 years agoMove registration code of max_user_ip, proxy_auth and proxy_auth_regex
Christos Tsantilas [Wed, 25 Mar 2009 11:46:09 +0000 (13:46 +0200)] 
Move registration code of max_user_ip, proxy_auth and proxy_auth_regex
acls from src/auth/Acl*  into the src/AclRegs.cc

15 years agoThe defines ENABLE_SSL, ENABLE_ARP_ACL, ENABLE_IDENT are never defined.
Christos Tsantilas [Wed, 25 Mar 2009 11:14:33 +0000 (13:14 +0200)] 
The defines ENABLE_SSL, ENABLE_ARP_ACL, ENABLE_IDENT are never defined.
The correct defines are USE_SSL, USE_ARP_ACL and USE_IDENT respectivelly

15 years agoFix the wrong "ifndef" in the beggining of the ExtUser.h file.
Christos Tsantilas [Wed, 25 Mar 2009 11:09:58 +0000 (13:09 +0200)] 
Fix the wrong "ifndef" in the beggining of the ExtUser.h file.
The old "SQUID_ACLIDENT_H" refers to the include file "acl/Ident.h"
causing problems when both files included in a source file.

15 years agoinside the IpAddress::IpAddress(IpAddress *s) constructor, the line
Christos Tsantilas [Wed, 25 Mar 2009 09:48:11 +0000 (11:48 +0200)] 
inside the IpAddress::IpAddress(IpAddress *s) constructor, the line
"operator=(s)" causing the constructor to recursively call itself,
causing segmentation fault.

15 years agoFix more typos in intercept
Amos Jeffries [Tue, 24 Mar 2009 11:34:21 +0000 (00:34 +1300)] 
Fix more typos in intercept

15 years agoFix build error in Acl*Checklist
Amos Jeffries [Mon, 23 Mar 2009 23:06:38 +0000 (11:06 +1200)] 
Fix build error in Acl*Checklist

15 years agoTypos in intercept
Amos Jeffries [Mon, 23 Mar 2009 22:53:57 +0000 (10:53 +1200)] 
Typos in intercept

15 years agoUpdates
Amos Jeffries [Mon, 23 Mar 2009 13:13:46 +0000 (01:13 +1200)] 
Updates

15 years agodist some languages missing from make
Amos Jeffries [Mon, 23 Mar 2009 12:44:36 +0000 (00:44 +1200)] 
dist some languages missing from make

15 years agoSync with Rosetta Project
Amos Jeffries [Mon, 23 Mar 2009 11:18:07 +0000 (23:18 +1200)] 
Sync with Rosetta Project

15 years agoUpdates auto-save
Amos Jeffries [Sun, 22 Mar 2009 00:00:45 +0000 (12:00 +1200)] 
Updates auto-save

15 years agoShuffle PF interception into its own function.
Amos Jeffries [Sat, 21 Mar 2009 00:57:14 +0000 (13:57 +1300)] 
Shuffle PF interception into its own function.

With this all of the transparent build options are independent, and may be
used in any combination. Squid is no longer bound to the single-firewall
interception support.

NP: one small note the PF lookup is slightly weird due to its altering
the local client address from the NAT information.

15 years agoBug 2618: fix ipfilter transparent proxy
Amos Jeffries [Sat, 21 Mar 2009 00:32:33 +0000 (13:32 +1300)] 
Bug 2618: fix ipfilter transparent proxy

Moved IPF lookup into it's own function to take advantage of shared
intercept logics preparation.

Thanks to John Wehle <john@feith.com> for providing the code fixes.

15 years agoFixed typo: checkCallback should call the parent checkCallback method and
Alex Rousskov [Fri, 20 Mar 2009 20:42:11 +0000 (14:42 -0600)] 
Fixed typo: checkCallback should call the parent checkCallback method and
not itself.

15 years agoPolish on Coverity fixes.
Amos Jeffries [Fri, 20 Mar 2009 04:06:09 +0000 (17:06 +1300)] 
Polish on Coverity fixes.

Typo on array size remained.

And IPAddress operator proved to be unneeded. Now killed completely.

15 years agoSourceLayout: esi/, take 1
Alex Rousskov [Thu, 19 Mar 2009 19:31:31 +0000 (13:31 -0600)] 
SourceLayout: esi/, take 1

Moved src/ESI* files into src/esi/.
Renamed ESI source files from ESIFoo.{cc,cci,h} to Foo.{cc,cci,h}.

Replaced implicit constructor-based Parser registration with an explicit call
to Esi::Init() which knows of all ESI parsers. Added Esi::Clean counterpart.

Made libTrie build conditional on ESI support being enabled.

No true source code changes except for parser initialization.
No functionality changes were intended.
No runtime tests with ESI performed.

TODO: I did not move the tests/ESIExpressions test into src/esi because
we need to fix the entire testing layout before we should start
moving individual tests: They currently depend on individual source
and object files in src/ and in tests/ and that kind of dependency
should not be multiplied but removed.

TODO: Move ESI types into the Esi namespace.

15 years agoMerged from trunk.
Alex Rousskov [Thu, 19 Mar 2009 19:30:38 +0000 (13:30 -0600)] 
Merged from trunk.

15 years agoVarious errors detected by Coverity scan
Amos Jeffries [Thu, 19 Mar 2009 14:44:22 +0000 (03:44 +1300)] 
Various errors detected by Coverity scan

15 years agoCoverity detected buffer access error
Amos Jeffries [Thu, 19 Mar 2009 13:52:49 +0000 (02:52 +1300)] 
Coverity detected buffer access error

Defined values for SNMP error use decimal values 0-9, 17-24 not 0-19.
Thus the static list of message mappings is out by 6.

15 years agoTypo in IPC
Amos Jeffries [Thu, 19 Mar 2009 12:28:22 +0000 (01:28 +1300)] 
Typo in IPC

15 years agoBug #2605: Don't call setsid() on helper childs when running in daemon mode
Henrik Nordstrom [Thu, 19 Mar 2009 09:09:03 +0000 (10:09 +0100)] 
Bug #2605: Don't call setsid() on helper childs when running in daemon mode

15 years agoMerged from trunk.
Alex Rousskov [Tue, 17 Mar 2009 20:36:45 +0000 (14:36 -0600)] 
Merged from trunk.

15 years agoFixed and polished comments.
Alex Rousskov [Tue, 17 Mar 2009 17:10:57 +0000 (11:10 -0600)] 
Fixed and polished comments.

15 years agoInit and Clean ESI module on startup (mainInitialize) and
Alex Rousskov [Tue, 17 Mar 2009 16:57:05 +0000 (10:57 -0600)] 
Init and Clean ESI module on startup (mainInitialize) and
shutdown (SquidShutdown).

15 years agoSynced after simplifying the parser registration API.
Alex Rousskov [Tue, 17 Mar 2009 15:29:06 +0000 (09:29 -0600)] 
Synced after simplifying the parser registration API.

15 years agoAdded ESI module management code to register and de-register ESI parsers.
Alex Rousskov [Tue, 17 Mar 2009 15:27:56 +0000 (09:27 -0600)] 
Added ESI module management code to register and de-register ESI parsers.

15 years agoSimplified registration. We will no longer support implicit registration using
Alex Rousskov [Tue, 17 Mar 2009 15:24:36 +0000 (09:24 -0600)] 
Simplified registration. We will no longer support implicit registration using
static initialization because that not-referenced-by-Squid code gets removed
when building the squid executable from convenience libraries.

Support de-registration as long as it is done in the order opposite of
registration.

15 years agoRemoved min() re-definition.
Alex Rousskov [Tue, 17 Mar 2009 14:29:02 +0000 (08:29 -0600)] 
Removed min() re-definition.
compat/compat_shared.h:114 is the location of the min() definition.

15 years agoAuthor: Various Translators
Amos Jeffries [Tue, 17 Mar 2009 10:36:28 +0000 (22:36 +1200)] 
Author: Various Translators
Language Updates: Uzbek, Persian

15 years agoSync with Rosetta Project
Amos Jeffries [Tue, 17 Mar 2009 10:35:31 +0000 (22:35 +1200)] 
Sync with Rosetta Project

15 years agoMerged from trunk.
Alex Rousskov [Tue, 17 Mar 2009 05:25:04 +0000 (23:25 -0600)] 
Merged from trunk.

15 years agoSupport multiple test spec arguments. If at least one test fails, the
Alex Rousskov [Tue, 17 Mar 2009 04:50:20 +0000 (22:50 -0600)] 
Support multiple test spec arguments. If at least one test fails, the
script exits with a non-zero code (but possibly not immediately, see
--keep-going).

Each test spec is a test config file name or a well-known config name
(no path or extension!). If no specs are given, all known test specs are
used (as before). The same happens if the only test spec given is 'all'.
The following are now equivalent:

    ./test-builds.sh
    ./test-builds.sh all
    ./test-builds.sh btlayer-00-default btlayer-01-minimal btlayer-02-maximus
    ./test-builds.sh test-suite/buildtests/layer-*

You can mix file names and spec names, but not the 'all' macro: There is
currently no support for using 'all' together with other test cases.

Tolerate individual test errors if --keep-going is specified. This helps
when one wants to find more errors than just the first one, especially
when tests are long and are running without a human watching.

When detecting test failures, rely on test-suite/buildtest.sh exit
status code rather than on the presence of error-like strings in the log
file.

Added and polished comments. Comments need more work.

15 years agoPolished.
Alex Rousskov [Tue, 17 Mar 2009 04:47:08 +0000 (22:47 -0600)] 
Polished.

15 years agoReturn the result of the last command explicitly. The script seems to work
Alex Rousskov [Tue, 17 Mar 2009 04:44:17 +0000 (22:44 -0600)] 
Return the result of the last command explicitly. The script seems to work
fine without this code, but it might make things more clear.

Hopefully, $? is no less portable than implicit result return. We can replace
$?  with an if-statement if $? is not portable.

15 years agoMerged from trunk.
Alex Rousskov [Tue, 17 Mar 2009 04:31:38 +0000 (22:31 -0600)] 
Merged from trunk.

15 years agoPolshed debugging, comments.
Alex Rousskov [Tue, 17 Mar 2009 04:18:32 +0000 (22:18 -0600)] 
Polshed debugging, comments.

15 years agoMerged from trunk.
Alex Rousskov [Tue, 17 Mar 2009 03:39:54 +0000 (21:39 -0600)] 
Merged from trunk.

15 years agoFixed the problem with Squid executable missing code to process ACLs.
Alex Rousskov [Tue, 17 Mar 2009 02:05:33 +0000 (20:05 -0600)] 
Fixed the problem with Squid executable missing code to process ACLs.
The solution will probably be replaced by a better one eventually.

15 years agoFixed the problem with Squid executable missing code to process ACLs.
Alex Rousskov [Tue, 17 Mar 2009 02:04:14 +0000 (20:04 -0600)] 
Fixed the problem with Squid executable missing code to process ACLs.
The solution will probably be replaced by a better one eventually.

Background:

Squid uses a "registry pattern" to register parsing and matching code specific
to most ACL types. The registration happens in acl/libacls convenience
library. The rest of Squid does not know about specific ACL types; it only has
access to a registry of pointers to what looks like generic ACL objects.  When
Squid executable is linked, most object files containing specific ACL types
are dropped (i.e., ignored) by the linker because they do not satisfy any
unresolved symbols and, hence, deemed unnecessary.

ACL object files were not missing when Squid executable was built using
explicit ACL object files names because the linker treats those differently
than object files in a convenience library -- it includes them whole.

Attempts to find a fix:

My attempts to link with a static convenience library (libtool's -static
option when defining the library) were not successful: the end result is the
same. The static and regular convenience libraries appear to be different, but
the linker, apparently, troughs out "unnecessary" symbols from both.

My attempts to pass -whole-archive to the linker were not successful: libtool
would reorder the arguments when calling the actual linker, resulting in the
wrong parameter order. I did protect -Wl,-whole-archive and friends with
AC_SUBST() and tried a few different versions of that protection, but was not
successful. It is possible that I just did not find the right trick to make it
work. However, -whole-archive is not portable so it would not be an ideal
solution anyway.

The fix:

I have moved registration code from src/acl/* sources into a src/AclRegs.cc
file, making the latter the source file for Squid executable. With this
change, Squid knows about specific ACL types (because they are needed by the
registration code) and the corresponding ACL classes get linked.

A similar solution is currently used for DiskIO modules, except there the
"pull everything in" source file (DiskIO/DiskIOModules_gen.cc) is generated
and called explicitly.  We may end up generating AclRegs.cc as well, but there
does not seem to be a particular advantage of adding that level of complexity.

Future:

A few options are available:

a) Find flaws in the above attempts to convince libtool to do the right thing
and fix the problem using libtool parameters alone.

b) Wait for libtool to support the kind of convenience library that we need
(the one that does -whole-archive when building an executable).

c) Add some kind of Acl::ModuleInit() global that Squid would call to register
known ACL types. AclRegs.cc code can be moved to acl/* sources then.

15 years agoFixed header guard to allow acl/DestinationDomain.h to be compiled together
Alex Rousskov [Mon, 16 Mar 2009 23:14:18 +0000 (17:14 -0600)] 
Fixed header guard to allow acl/DestinationDomain.h to be compiled together
with acl/SourceDomain.h.

15 years agoMerged from trunk.
Alex Rousskov [Fri, 13 Mar 2009 21:54:28 +0000 (15:54 -0600)] 
Merged from trunk.

15 years agoBuild libTrie only if ESI is enabled. Nothing else appears to use that library.
Alex Rousskov [Fri, 13 Mar 2009 21:47:14 +0000 (15:47 -0600)] 
Build libTrie only if ESI is enabled. Nothing else appears to use that library.
Do not include libTrie/src/Trie*.o in libmiscutil. Code needing ESI should
include libTrie (which was previously unused except for libTrie/test?).

TODO: Is it OK to covert libTrie to a convinience library? If yes, we should
LIBADD libTrie to libesi so that we do not have to remember to add libTrie
when we use libesi.

15 years agoDo not redefine max(). compat/compat_shared.h:135 is the location of the
Alex Rousskov [Fri, 13 Mar 2009 21:44:10 +0000 (15:44 -0600)] 
Do not redefine max(). compat/compat_shared.h:135 is the location of the
previous definition.

Made max() #define safer. Do we really need it?

15 years agoMade max #define safer. Do we really need it?
Alex Rousskov [Fri, 13 Mar 2009 21:41:51 +0000 (15:41 -0600)] 
Made max #define safer. Do we really need it?

15 years agoSourceLayout: acl/, take 1
Alex Rousskov [Fri, 13 Mar 2009 21:05:54 +0000 (15:05 -0600)] 
SourceLayout: acl/, take 1

Moved src/ACL* and a few related files into src/acl/.
Renamed ACL source files from ACLFoo.{cc,cci,h} to Foo.{cc,cci,h}.

Added acl/ libraries, reorganized auth/ libraries, and split ACLChecklist
class to avoid circular dependencies among libraries.

Many targets in src/Makefile.am depended on selected ACL ACL*cc and related
sources.  These targets depend on acl/* libraries now. As a part of this
cleanup, the number of ufsdump sources went from about 160 to about 20.

No functionality changes were intended. Source code changes were kept to the
minimum. All my build tests are successful. However, since I had to move a lot
of files, move some code pieces, and split ACLChecklist, it is possible that
some targets will no longer build in some environments and some authentication
code will break.

Please see individual commit messages for details.

15 years agoMerged from trunk.
Alex Rousskov [Fri, 13 Mar 2009 20:45:32 +0000 (14:45 -0600)] 
Merged from trunk.

15 years agoBug 1232: cache_dir parameter limited to only 63 entries.
Amos Jeffries [Wed, 11 Mar 2009 08:56:13 +0000 (21:56 +1300)] 
Bug 1232: cache_dir parameter limited to only 63 entries.

This alters the squid.conf parsing limit on cache_dir entries
into a softer configuration warning. It was a core dump.

Also opens the final bit of the 7-bit signed range for use
which makes the limit 64 cache dirs in total.

15 years agoMerged from trunk.
Alex Rousskov [Tue, 10 Mar 2009 21:00:00 +0000 (15:00 -0600)] 
Merged from trunk.

15 years agoSourceLayout: esi/, take 1
Alex Rousskov [Tue, 10 Mar 2009 20:52:45 +0000 (14:52 -0600)] 
SourceLayout: esi/, take 1

Moved src/ESI* files into src/esi/.
Renamed ESI source files from ESIFoo.{cc,cci,h} to Foo.{cc,cci,h}.

No true source code changes.
No functionality changes were intended.
No runtime tests with ESI performed.

TODO: I did not move the tests/ESIExpressions test into src/esi because
we need to fix the entire testing layout before we should start
moving individual tests: They currently depend on individual source
and object files in src/ and in tests/ and that kind of dependency
should not be multiplied but removed.

TODO: Move ESI types into the Esi namespace.

15 years agoBug 2559: Problem parsing /0 and /0.0.0.0
Amos Jeffries [Tue, 10 Mar 2009 14:29:30 +0000 (03:29 +1300)] 
Bug 2559: Problem parsing /0 and /0.0.0.0

netmask strikes again.

Squid was parsing /0 on an IPv4 as mask /0.0.0.0 before v4-mapping the
mask to /96 IPv6. Which is invalid CIDR size for IPv4 and maps back as
0.0.0.0/32 there during ACL matching.
This affects any input of /0 and equivalents but in a fail-closed way.

Force /0 to the magic noaddr mask regardless of the protocol.

Also adds a lot of level-9 debugs for tracing other issues in IP ACL parse

15 years agoBug 2404: WCCP in mask mode is broken
Amos Jeffries [Tue, 10 Mar 2009 12:36:54 +0000 (01:36 +1300)] 
Bug 2404: WCCP in mask mode is broken

Also autodoc and cleanup some WCCPv2 structures.

This patch:
 - adds a reference to each struct mentioning the exact draft
   RFC section where that struct is defined.
 - fixes sent mask structure fields to match draft. (bug 2404)
 - removes two duplicate useless structs

15 years agoAuthor: Rafal Ramocki <maniac@sistbg.net>
Amos Jeffries [Mon, 9 Mar 2009 23:33:08 +0000 (12:33 +1300)] 
Author: Rafal Ramocki <maniac@sistbg.net>
Bug 2589: SNMP returning no data - wrong oid decoded.

15 years agoSupport multiple test spec arguments. If at least one test fails, the script
Alex Rousskov [Mon, 9 Mar 2009 16:20:57 +0000 (10:20 -0600)] 
Support multiple test spec arguments. If at least one test fails, the script
exits with a non-zero code (but posibly not immediately, see --keep-going).

Each test spec is a test config file name or a well-known config name (no path
or extension!). If no specs are given, all known test specs are used (as
before). The same happens if the only test spec given is 'all'. The
following are now equivalent:

    ./test-builds.sh
    ./test-builds.sh all
    ./test-builds.sh btlayer-00-default btlayer-01-minimal btlayer-02-maximus
    ./test-builds.sh test-suite/buildtests/layer-*

You can mix file names and spec names, but not the 'all' macro: There is
currently no support for using 'all' together with other test cases.

Tolerate individual test errors if --keep-going is specified. This helps when
one wants to find more errors than just the first one, especially when tests
are long and are running without a human watching.

When detecting test failures, rely on test-suite/buildtest.sh exit status code
rather than on the presence of error-like strings in the log file.

Added and polished comments.

15 years agoTestBed: make parent layer find sucess message in its new location
Amos Jeffries [Mon, 9 Mar 2009 10:36:39 +0000 (04:36 -0600)] 
TestBed: make parent layer find sucess message in its new location

15 years agoMerged from trunk.
Alex Rousskov [Mon, 9 Mar 2009 05:53:08 +0000 (23:53 -0600)] 
Merged from trunk.

15 years agoMoved authenticated() method from ACL[Filled]Checklist into auth/Acl.{cc,h} to
Alex Rousskov [Sun, 8 Mar 2009 22:20:22 +0000 (16:20 -0600)] 
Moved authenticated() method from ACL[Filled]Checklist into auth/Acl.{cc,h} to
break the circular dependency between acl/libs and auth/libs.

Context: SourceLayout: acl/, take 1

15 years agoSynced #includes after moving files around.
Alex Rousskov [Sun, 8 Mar 2009 21:57:12 +0000 (15:57 -0600)] 
Synced #includes after moving files around.

Use newly added ACLFilledChecklist for fast ACL checks. Its constructor locks
request and accessList, simplifying the caller code.

Use newly added ACLFilledChecklist for state-specific ACL code. Also, the
ACLChecklist::authenticated() method is now an AuthenticateAcl global
function. See ACLFilledChecklist addition log for rationale.

Context: SourceLayout: acl/, take 1

15 years agoSynced #includes after moving files around.
Alex Rousskov [Sun, 8 Mar 2009 21:53:27 +0000 (15:53 -0600)] 
Synced #includes after moving files around.

Use newly added ACLFilledChecklist for fast ACL checks. Its constructor locks
request and accessList, simplifying the caller code.

Use newly added ACLFilledChecklist for state-specific ACL code. Also, the
ACLChecklist::authenticated() method is now an AuthenticateAcl global
function. See ACLFilledChecklist addition log for rationale.

Context: SourceLayout: acl/, take 1

15 years agoRemoved some 140 SOURCEs of ufsdump, adding a few stubs. The program seems to
Alex Rousskov [Sun, 8 Mar 2009 21:37:32 +0000 (15:37 -0600)] 
Removed some 140 SOURCEs of ufsdump, adding a few stubs. The program seems to
work on simple ufs cache files.

urlCanonical is currently an always-asserting stub. I am not sure what pulls
in urlCanonical. I know storeKeyPublicByRequest* require it, but I am not sure
which source requires storeKeyPublicByRequest. If the stub assertion fails on
some cache files, we will need to pull more sources or re-implement
urlCanonical.

The more sources are moved into libraries, the more difficult it may be to
write isolated, compact test cases or tools because test case stubs and
customizations may start to conflict with names defined in the libraries and
because pulling in a whole library might require defining more stubs. It is
not clear yet how real this concern is in general, but a lot of acl/
SourceLayout time was spent on making ufsdump build...

Context: SourceLayout: acl/, take 1

15 years agoSplit auth/libauth into two libraries:
Alex Rousskov [Sun, 8 Mar 2009 21:29:22 +0000 (15:29 -0600)] 
Split auth/libauth into two libraries:

  - auth/libauth containing core authentication code (used, in part,
    by the acl/libstate library) and not using acl/ libraries; and
  - auth/libacls containing authentication-related ACL code (used to build
    executables) and using acl/libstate.

The split was necessary to prevent circular dependencies among acl/ and auth/
libraries.

Added conditionally built libraries to libauth, eliminating the need for
AUTH_LIBS_TO_ADD. Use libtool to build those libraries.

Context: SourceLayout: acl/, take 1

15 years agoMoved src/ACL* and a few related files into src/acl/.
Alex Rousskov [Sun, 8 Mar 2009 21:19:10 +0000 (15:19 -0600)] 
Moved src/ACL* and a few related files into src/acl/.
Renamed ACL source files from ACLFoo.{cc,cci,h} to Foo.{cc,cci,h}.

Many targets in src/Makefile.am depended on selected ACL ACL*cc and related
sources.  These targets depend on acl/* libraries now. As a part of this
cleanup and reorganization, the number of ufsdump sources went from about 160
to about 20.

Context: SourceLayout: acl/, take 1

15 years agoSynced #includes after moving files around.
Alex Rousskov [Sun, 8 Mar 2009 19:57:33 +0000 (13:57 -0600)] 
Synced #includes after moving files around.

Context: SourceLayout: acl/, take 1

15 years agoSplit ACL.{cc,h} and src/acl_noncore.cc into acl/Acl and acl/Gadgets, moving
Alex Rousskov [Sun, 8 Mar 2009 19:45:44 +0000 (13:45 -0600)] 
Split ACL.{cc,h} and src/acl_noncore.cc into acl/Acl and acl/Gadgets, moving
high-level global functions into Gadgets and leaving basic API types in Acl.

Moved horrific acl_access::containsPURGE into aclPurgeMethodInUse to avoid
exposing basic ACL API to "strategy" templates and HTTP-specific PURGE method.
The aclPurgeMethodInUse global lives in acl/libacls, which is a top-level
library that already contains a lot of data-specific code.

Context: SourceLayout: acl/, take 1

15 years agoExtracted transaction state storage and related checks from ACLChecklist into
Alex Rousskov [Sun, 8 Mar 2009 19:41:27 +0000 (13:41 -0600)] 
Extracted transaction state storage and related checks from ACLChecklist into
ACLFilledChecklist. Context: SourceLayout: acl/, take 1

ACLChecklist contained many data members representing the state of the current
transaction (in a broad sense). These members and related methods depended
on complex types such as HttpRequest and ConnStateData. Any Squid code using
ACLChecklist (and there is a lot of that code) was, hence, dependent on these
types. These dependencies caused, among other things, huge SOURCES lists in
src/Makefile.am, often for trivial targets such as ufsdump and test cases.

ACLChecklist is an abstract class now (to make sure we do not accidentally
create it). ACLChecklist has only one kid: ACLFilledChecklist. The Filled()
global function can be used to cast ACLChecklist* to ACLFilledChecklist*.
Since all ACLChecklist objects have to be ACLFilledChecklist objects, the cast
is fast and safe. The cast allows us to avoid bloating ACLChecklist with
virtual methods that only make sense in ACLFilledChecklist context.

ACLFilledChecklist now contains state-specific members while ACLChecklist
contains basic check list logic. The code that organizes or passes through
ACL checks does not need to be exposed to ACLFilledChecklist and the data
types it depends on.

Furthermore, ACLFilledChecklist should not contain complicated checks either.
It should focus on maintaining the state. The checks should go into specific
ACLs. Otherwise, complex checks cause dependency cycles with higher-level
libraries that provide code for those checks and yet depend on having access
to ACLFilledChecklist to implement specific ACLs. Currently, only the
authenticated() method got moved to auth/Acl.{cc,h} to break the circular
dependency between acl/libs and auth/libs. More work in that direction will
probably be required as we move more src/* code into libraries.

ACLFilledChecklist constructor replaces aclChecklistCreate global. This
simplifies the initiating code of all fast ACL checks: the checks no longer
need to do manual state locking, duplicating aclChecklistCreate code.

15 years agoRemoved AUTH_LIBS_TO_ADD as unused. auth/libauth.la now includes conditionally
Alex Rousskov [Sun, 8 Mar 2009 19:38:12 +0000 (13:38 -0600)] 
Removed AUTH_LIBS_TO_ADD as unused. auth/libauth.la now includes conditionally
built auth libraries and src/Makefile.am no longer needs to know about them.

Added acl/Makefile generation.

Context: SourceLayout: acl/, take 1

15 years agoMoved src/ACL* and a few related files into src/acl/.
Alex Rousskov [Sun, 8 Mar 2009 19:34:36 +0000 (13:34 -0600)] 
Moved src/ACL* and a few related files into src/acl/.
Renamed ACL source files from ACLFoo.{cc,cci,h} to Foo.{cc,cci,h}.

Many targets in src/Makefile.am depended on selected ACL ACL*cc and related
sources.  These targets depend on acl/* libraries now. As a part of this
cleanup and reorganization, the number of ufsdump sources went from about 160
to about 20.

Context: SourceLayout: acl/, take 1

15 years agoFixed subdir handling when USE_LOADABLE_MODULES is false. DIST_SUBDIRS was
Alex Rousskov [Sun, 8 Mar 2009 18:41:06 +0000 (12:41 -0600)] 
Fixed subdir handling when USE_LOADABLE_MODULES is false. DIST_SUBDIRS was
defined incorrectly. Moreover, we do not need to define DIST_SUBDIRS because
the default works:

  "If `SUBDIRS' is defined conditionally using Automake conditionals,
  Automake will define `DIST_SUBDIRS' automatically from the possibles
  values of `SUBDIRS' in all conditions."

The bug was exposed by ./test-builds.sh layer-01-minimal with "make distcheck"
test added.

15 years agoWrap #define max in an #ifndef to avoid conflict with squid compat.h
Henrik Nordstrom [Sun, 8 Mar 2009 13:22:37 +0000 (14:22 +0100)] 
Wrap #define max in an #ifndef to avoid conflict with squid compat.h

15 years agoRemove empty unused class Adaptation::Icap::Options, barfed at by GCC-4.4
Henrik Nordstrom [Sun, 8 Mar 2009 13:21:33 +0000 (14:21 +0100)] 
Remove empty unused class Adaptation::Icap::Options, barfed at by GCC-4.4

15 years agoMake GCC-4.4 happy
Henrik Nordstrom [Sun, 8 Mar 2009 13:19:15 +0000 (14:19 +0100)] 
Make GCC-4.4 happy

15 years agoAdd Content-Disposition to the known headers list.
Amos Jeffries [Sun, 8 Mar 2009 11:01:14 +0000 (00:01 +1300)] 
Add Content-Disposition to the known headers list.