]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years agoFixed Eui::Eui64::encode stub
Francesco Chemolli [Tue, 30 Dec 2014 21:47:57 +0000 (22:47 +0100)] 
Fixed Eui::Eui64::encode stub

10 years agoMigrated acl/Eui64 to Splay
Francesco Chemolli [Tue, 30 Dec 2014 16:52:25 +0000 (17:52 +0100)] 
Migrated acl/Eui64 to Splay

10 years agoMigrated acl/DomainData to Splay
Francesco Chemolli [Tue, 30 Dec 2014 16:05:48 +0000 (17:05 +0100)] 
Migrated acl/DomainData to Splay

10 years agoMerged from trunk
Francesco Chemolli [Tue, 30 Dec 2014 14:59:16 +0000 (15:59 +0100)] 
Merged from trunk

10 years agoFix 'field precision specifier '.*' expects argument of type 'int'
Amos Jeffries [Tue, 30 Dec 2014 14:37:32 +0000 (06:37 -0800)] 
Fix 'field precision specifier '.*' expects argument of type 'int'

10 years agoReworked acl/Arp to use Splay instead of SplayNode
Francesco Chemolli [Tue, 30 Dec 2014 14:24:28 +0000 (15:24 +0100)] 
Reworked acl/Arp to use Splay instead of SplayNode

10 years agontlm_smb_lm_auth: fix compile errors after rev.13785
Amos Jeffries [Tue, 30 Dec 2014 14:24:28 +0000 (06:24 -0800)] 
ntlm_smb_lm_auth: fix compile errors after rev.13785

10 years agoAdded default arguments to Splay::destroy
Francesco Chemolli [Tue, 30 Dec 2014 14:23:21 +0000 (15:23 +0100)] 
Added default arguments to Splay::destroy
Added documentation to Splay::find
Added Splay::empty()
Removed obsolete tests in test-suite/splay.cc

10 years agontlm_fake_auth: fix compile errors after rev.13785
Amos Jeffries [Tue, 30 Dec 2014 14:07:54 +0000 (06:07 -0800)] 
ntlm_fake_auth: fix compile errors after rev.13785

10 years agoFix 64-bit compile issues in rev.13785
Amos Jeffries [Tue, 30 Dec 2014 13:40:33 +0000 (05:40 -0800)] 
Fix 64-bit compile issues in rev.13785

The Nettle 3.0 library API imported and used by rev.13785 defines
function symbols with size_t parameters where earlier libraries used
'unsigned'. This matters on 64-bit systems where unsigned is a 'int'
and size_t a 'long' - implicit conversion is not possible.

Explicitly detect the size_t API existence during ./configure time and
use the built-in logics if supplied Nettle library is an older version.

10 years agoSourceFormat Enforcement
Source Maintenance [Tue, 30 Dec 2014 12:12:03 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agobasic_msnt_multi_domain_auth: Superceeded by basic_smb_lm_auth
Amos Jeffries [Tue, 30 Dec 2014 10:22:29 +0000 (02:22 -0800)] 
basic_msnt_multi_domain_auth: Superceeded by basic_smb_lm_auth

This helper consisted of a Perl script requiring special Perl
SMB:Authen module and Samba nmblookup helper to operate.

It performs the same operations as basic_smb_lm_auth helper,
so is not actually needed.

It also contains a slightly ambiguous copyright license as it
was published to the squid-users mailing list in effective
Public Domain free for any use, but without explicit statement
to the fact.

10 years agobasic_msnt_auth: rename to basic_smb_lm_auth and deprecate
Amos Jeffries [Tue, 30 Dec 2014 10:05:05 +0000 (02:05 -0800)] 
basic_msnt_auth: rename to basic_smb_lm_auth and deprecate

10 years agoCrypto-NG: Base64 crypto replacement
Amos Jeffries [Tue, 30 Dec 2014 09:09:27 +0000 (01:09 -0800)] 
Crypto-NG: Base64 crypto replacement

The existing Squid base64 code had ambiguous copyright licensing. In
particular it only referenced a dead URL for source copyright
ownership details. In all likelihood this was for an Open Source
implementation, but we dont have sufficient record of the original
license terms to be certain without a long investigation.

It has also been heavily modified and customized over the decades
since importing whih complicates the issue a lot.

It also does not match any of the common industry context-based API
patterns for encoders/decoders.

This patch replaces that logic with GPLv2 licensed code from the
Nettle crypto library. Either linking the library dynamically or in
its absence embedding the logic via our libmiscencoding library.

It also updates all code to the new API, and as a byproduct removes
several layers of deprecated wrapper functions which have grown in
over the years.

10 years agoSimplified MSNT basic auth helper
Francesco Chemolli [Tue, 30 Dec 2014 07:46:14 +0000 (08:46 +0100)] 
Simplified MSNT basic auth helper

10 years agoCleanup: sync ModSelect.cc and ModSelectWin32.cc
Amos Jeffries [Tue, 30 Dec 2014 06:51:44 +0000 (22:51 -0800)] 
Cleanup: sync ModSelect.cc and ModSelectWin32.cc

10 years agoBoilerplate: add copyright blurbs for cf.data files
Amos Jeffries [Tue, 30 Dec 2014 04:55:05 +0000 (20:55 -0800)] 
Boilerplate: add copyright blurbs for cf.data files

10 years agoReverted move-constructor-related changes
Francesco Chemolli [Mon, 29 Dec 2014 16:32:29 +0000 (17:32 +0100)] 
Reverted move-constructor-related changes

10 years agoYet more aggressive workaround attempt
Francesco Chemolli [Mon, 29 Dec 2014 15:53:44 +0000 (16:53 +0100)] 
Yet more aggressive workaround attempt

10 years agoYet more aggressive workaround attempt
Francesco Chemolli [Mon, 29 Dec 2014 13:43:02 +0000 (14:43 +0100)] 
Yet more aggressive workaround attempt

10 years agoMore aggressive workaround attempt
Francesco Chemolli [Mon, 29 Dec 2014 13:14:16 +0000 (14:14 +0100)] 
More aggressive workaround attempt

10 years agoTry to disable move semantics for domaincontroller to work around clang bug in centos 6
Francesco Chemolli [Mon, 29 Dec 2014 10:35:30 +0000 (11:35 +0100)] 
Try to disable move semantics for domaincontroller to work around clang bug in centos 6

10 years agoAdd useage instructions
Francesco Chemolli [Sun, 28 Dec 2014 20:49:45 +0000 (21:49 +0100)] 
Add useage instructions

10 years agoDocumentation updates
Francesco Chemolli [Sun, 28 Dec 2014 20:49:25 +0000 (21:49 +0100)] 
Documentation updates

10 years agoRemoved configuration file
Francesco Chemolli [Sat, 27 Dec 2014 21:32:53 +0000 (22:32 +0100)] 
Removed configuration file

10 years agoRemoved c++11-ism, worked around SMB_Connect_Server not checking arguments. Functiona...
Francesco Chemolli [Sat, 27 Dec 2014 21:03:05 +0000 (22:03 +0100)] 
Removed c++11-ism, worked around SMB_Connect_Server not checking arguments. Functional testing ok

10 years agoReverted most changes to valid_user.cc
Francesco Chemolli [Sat, 27 Dec 2014 20:47:53 +0000 (21:47 +0100)] 
Reverted most changes to valid_user.cc

10 years agoMerged other changes
Francesco Chemolli [Sat, 27 Dec 2014 20:28:57 +0000 (21:28 +0100)] 
Merged other changes

10 years agoSourceFormat Enforcement
Source Maintenance [Wed, 24 Dec 2014 12:12:04 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agopconn_lifetime
Christos Tsantilas [Wed, 24 Dec 2014 09:20:52 +0000 (11:20 +0200)] 
pconn_lifetime

This patch add a new configuration option the 'pconn_lifetime' to allow users
set the desired maximum lifetime of a persistent connection.

When set, Squid will close a now-idle persistent connection that
exceeded configured lifetime instead of moving the connection into
the idle connection pool (or equivalent). No effect on ongoing/active
transactions. Connection lifetime is the time period from the
connection acceptance or opening time until "now".

This limit is useful in environments with long-lived connections
where Squid configuration or environmental factors change during a
single connection lifetime. If unrestricted, some connections may
last for hours and even days, ignoring those changes that should
have affected their behavior or their existence.

This option has the following behaviour when pipelined requests tunneled
to a connection where its lifetime expired:

 1. finish interpreting the Nth request
    check whether pconn_lifetime has expired
 2. if pconn_lifetime has expired, then stop further reading and
    do not interpret any already read raw bytes of the N+1st request
 3. otherwise, read and interpret read raw bytes of the N+1st request
    and go to #1.

This is a Measurement Factory project

10 years agoFixed argument parsing and SMB API
Francesco Chemolli [Mon, 22 Dec 2014 11:00:30 +0000 (12:00 +0100)] 
Fixed argument parsing and SMB API

10 years agoWindows: fix getaddrinfo, getnameinfo, inet_ntop and inet_pton detection
Amos Jeffries [Sun, 21 Dec 2014 16:28:17 +0000 (08:28 -0800)] 
Windows: fix getaddrinfo, getnameinfo, inet_ntop and inet_pton detection

These API symbols are not always defined as functions, and in varying
locations. AC_REPLACE_FUNCS cannot handle that kind of complexity so we
must use AC_CHECK_DECL instead and provide the sequence of #include
necessary to identify their existence.

10 years agoPrep for 3.5.0.4
Amos Jeffries [Sun, 21 Dec 2014 05:05:24 +0000 (21:05 -0800)] 
Prep for 3.5.0.4

10 years agoSourceFormat Enforcement
Source Maintenance [Sat, 20 Dec 2014 18:12:02 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoSourceFormat Enforcement
Source Maintenance [Sat, 20 Dec 2014 12:12:02 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agoMaintenance: bump astyle to 2.04 and quieten report
Source Maintenance [Sat, 20 Dec 2014 09:00:23 +0000 (09:00 +0000)] 
Maintenance: bump astyle to 2.04 and quieten report

10 years agoRemoved backup domain controller in SMBlibrary
Francesco Chemolli [Sat, 20 Dec 2014 08:17:05 +0000 (09:17 +0100)] 
Removed backup domain controller in SMBlibrary

10 years agoRemoved unneeded files
Francesco Chemolli [Sat, 20 Dec 2014 08:14:09 +0000 (09:14 +0100)] 
Removed unneeded files

10 years agoRip out most of the configuration file logic
Francesco Chemolli [Sat, 20 Dec 2014 08:00:35 +0000 (09:00 +0100)] 
Rip out most of the configuration file logic

10 years agoscripts/formater.pl: use strict perl syntax checking
squidadm@squid-cache.org [Sat, 20 Dec 2014 07:49:33 +0000 (07:49 +0000)] 
scripts/formater.pl: use strict perl syntax checking

10 years agosource-maintenance.sh: only check astyle version once
squidadm@squid-cache.org [Sat, 20 Dec 2014 07:09:43 +0000 (07:09 +0000)] 
source-maintenance.sh: only check astyle version once

10 years agoFix typos in rev.13770
Markus Moeller [Sat, 20 Dec 2014 05:27:35 +0000 (21:27 -0800)] 
Fix typos in rev.13770

10 years agoSourceLayout: shuffle mem_type enum to libmem
Amos Jeffries [Fri, 19 Dec 2014 23:15:55 +0000 (12:15 +1300)] 
SourceLayout: shuffle mem_type enum to libmem

10 years agonegotiate_kerberos_auth: MEMORY keytab and replay cache support
Markus Moeller [Fri, 19 Dec 2014 22:16:42 +0000 (14:16 -0800)] 
negotiate_kerberos_auth: MEMORY keytab and replay cache support

1) Checks for MEMORY: keytab support and reads the keytab from disk into
   MEMORY to improve performance (i.e. read keytab only at startup and
   nerver again)

2) Add option for replay cache type. Allows to set replay cache to none
   to improve performance ( may reduce security a bit )

3) Add option for replay cache directory.  If /var/tmp is not the best
   location you can choose a different location.

10 years agoFix HttpMsg initialization after rev.13754
Amos Jeffries [Fri, 19 Dec 2014 22:13:31 +0000 (14:13 -0800)] 
Fix HttpMsg initialization after rev.13754

10 years agoFix peek-and-splice mode: certificate validation for domain mismatched errors
Christos Tsantilas [Fri, 19 Dec 2014 17:54:32 +0000 (19:54 +0200)] 
Fix peek-and-splice mode: certificate validation for domain mismatched errors

Currently squid does not check for domain mismatched errors while validates the
server certificate on peek and splice mode, even if the server hostname is known
from SNI info or from CONNECT request string.

This is a Measurement Factory project

10 years agoMemPool the debug output stream buffers
Amos Jeffries [Fri, 19 Dec 2014 16:26:44 +0000 (08:26 -0800)] 
MemPool the debug output stream buffers

The CurrentDebug output stream controller for cache.log was
defined as a std::ostringstream object and allocated with
new/delete on each call to debugs().

The std::ostringstream is defined as a templates output stream
which uses the std::allocator<char> built into libc when its
new()'d. Since this is all internal to the STL library
definitions it links against the libc global-scope allocator.

However, there is no matching deallocator definition and when
the object is delete()'d the standard C++ operator overloading
rules make the global-scope SquidNew.h definition of
::operator delete() be the method of deallocation. That uses
free() internally.

To resolve the mismatch of new()/free() we must define a
wrapper class with explicit class-scope new/delete operators
instead of relying on weak linkages to overloaded global scope
operators.

As a result the memory is new()'d and free()'d. As detected by
Valgrind

10 years agoWindows: fix GCC 4.9 build issue in --enable-win32-service
Amos Jeffries [Fri, 19 Dec 2014 07:05:13 +0000 (23:05 -0800)] 
Windows: fix GCC 4.9 build issue in --enable-win32-service

10 years agoWindows: fix compile error after rev.13725
Amos Jeffries [Fri, 19 Dec 2014 07:03:04 +0000 (23:03 -0800)] 
Windows: fix compile error after rev.13725

10 years agoFix DONT_VERIFY_DOMAIN ssl flag
Christos Tsantilas [Thu, 18 Dec 2014 16:06:50 +0000 (18:06 +0200)] 
Fix DONT_VERIFY_DOMAIN ssl flag

The DONT_VERIFY_DOMAIN ssl flag set with the sslflags= option to cache_peer
directive does not work correctly.

10 years agoTypo in rev.13752
Amos Jeffries [Thu, 18 Dec 2014 12:39:24 +0000 (01:39 +1300)] 
Typo in rev.13752

10 years agoBug 1961, Bug 429: Add asterisk to class URL
Amos Jeffries [Thu, 18 Dec 2014 12:12:33 +0000 (01:12 +1300)] 
Bug 1961, Bug 429: Add asterisk to class URL

This does not yet perform any of the outgoing request mapping from
path-less URI required by current RFC 7231.

Squid already allows these URI in OPTIONS and TRACE requests (only).

It does make a start by cleaning up the current special case handling of
"*" URI to be matched by the URI class/namespace method and SBuf
comparisions instead of c-strings.

10 years agoext_ldap_group_acl: Version 2.18 documentation updates
Amos Jeffries [Wed, 17 Dec 2014 13:53:10 +0000 (02:53 +1300)] 
ext_ldap_group_acl: Version 2.18 documentation updates

Bump the helper version number to 2.18 as should have been done back in
2010 when previous redesign was made.

Also, add copyright notices to ChangeLog indicating MARA Systems
copyright to original 2.17 and older code, Squid Project on 2.18 and
newer additions.

10 years agobasic_ldap_auth: Drop unnecessary README
Amos Jeffries [Wed, 17 Dec 2014 13:45:28 +0000 (02:45 +1300)] 
basic_ldap_auth: Drop unnecessary README

10 years agoSupport http_access denials of SslBump "peeked" connections.
Christos Tsantilas [Tue, 16 Dec 2014 18:29:14 +0000 (20:29 +0200)] 
Support http_access denials of SslBump "peeked" connections.

If an SSL connection is "peeked", it is currently not possible to deny it
with http_access. For example, the following configuration denies all plain
HTTP requests as expected but allows all CONNECTs (and all subsequent
encrypted/spliced HTTPS requests inside the allowed CONNECT tunnels):

  http_access deny all
  ssl_bump peek all
  ssl_bump splice all

The bug results in insecure bumping configurations and/or forces admins to
abuse ssl_bump directive (during step1 of bumping) for access control (as a
partial workaround).

This change sends all SSL tunnels (CONNECT and transparent) through http_access
(and adaptation, etc.) checks during bumping step1. If (real or fake) CONNECT is
denied during step1, then Squid does not connect to the SSL server, but bumps
the client connection, and then delivers an error page (in response to the
first decrypted GET). The behavior is similar to what Squid has already been
doing for server certificate validation errors.

Technical notes
----------------

Before these changes:

  * When a transparent SSL connection is being bumped, if we decide to splice
    during step1, then we splice the connections without any http_access
    checks. The (spliced) connection is always established.

  * When a CONNECT tunnel is being bumped at step1, if peek/stare/server-first
    mode is selected, and our http_access check fails, then:
     1) We create an error page and proceeding with SSL bump, expecting
        to serve the error after the client SSL connection is negotiated.
     2) We start forwarding SSL Hello to the server, to peek/stare at (or
        server-first bump) the server connection.
     3) If we then decide to splice the connection during step2 or step3, then
        we splice, and the error page never gets served to the client!

After these changes:

  * During transparent SSL bumping, if we decide to splice at step1, do not
    splice the connection immediately, but create a fake CONNECT request first
    and send it through the callout code (http_access check, ICAP/ECAP, etc.).
    If that fake CONNECT is denied, the code path described below kicks in.

  * When an error page is generated during CONNECT or transparent bumping
    (e.g. because an http_access check has failed), we switch to the
    "client-first" bumping mode and then serve the error page to the client
    (upon receiving the first regular request on the bumped connection).

This is a Measurement Factory project.

10 years agoBug 4164: SEGFAULT when %W formating code used in errorpages
Christos Tsantilas [Tue, 16 Dec 2014 17:55:04 +0000 (19:55 +0200)] 
Bug 4164: SEGFAULT when %W formating code used in errorpages

Squid will crash inside ErrorState::Dump if not authentication configured for
squid. In this case ErrorState::auth_user_request is NULL and trying to access
a method of this object will cause segfault to squid.

10 years agoCleanup: remove unused OS detection of Sun, SysV, Ultrix, BSDi
Amos Jeffries [Tue, 16 Dec 2014 15:13:49 +0000 (04:13 +1300)] 
Cleanup: remove unused OS detection of Sun, SysV, Ultrix, BSDi

10 years agoBug 3826: pt 2: Provide a systemd .service file for Squid
Hussam Al-Tayeb [Tue, 16 Dec 2014 12:23:58 +0000 (01:23 +1300)] 
Bug 3826: pt 2: Provide a systemd .service file for Squid

Created with help from davidstrauss in #systemd channel and provided
as a working example for package distributors to use. It is not
installed by a 'make install' build of Squid.

For now SMP support is not available to Squid controlled by systemd.
That part of the bug 3826 issue has yet to be resolved.

10 years agoSourceLayout: shuffle Sys-V init script to tools/sysvinit/
Amos Jeffries [Tue, 16 Dec 2014 11:01:29 +0000 (00:01 +1300)] 
SourceLayout: shuffle Sys-V init script to tools/sysvinit/

10 years agoUpdate Http::ProtocolVersion() to initializer functions
Amos Jeffries [Thu, 11 Dec 2014 08:35:32 +0000 (00:35 -0800)] 
Update Http::ProtocolVersion() to initializer functions

The Http::ProtocolVersion(*) does not work sufficiently well as a class
hierarchy.

Convert Http::ProtocolVersion to two functions:

* Http::ProtocolVersion() providing the default Squid HTTP version
level, and

* Http::ProtocolVersion(unsigned, unsigned) providing the HTTP version
details for the given level.

NP: using two overloaded functions instead of one with default
parameter values because with HTTP/0.x and HTTP/2.x we cannot safely
default just the minor value. ie. using two functions prevents
mistakenly using HTTP/2.1, HTTP/0.1 or HTTP/1.0 if the second
parameter is omitted.

All variables must now be of type AnyP::ProtocolVersion, and should be
constructed from an appropriate Foo::ProtocolVersion() function.

10 years agoDeleting first fs left psstate->servers pointing to uninitialized memory
Christos Tsantilas [Tue, 9 Dec 2014 19:29:01 +0000 (21:29 +0200)] 
Deleting first fs left psstate->servers pointing to uninitialized memory
possibly causing infinite loops in peerAddFwdServer().

TODO: The condition itself is excessive. If fs is not nil, the previous check
already tells us that the Config.forward_max_tries limit is exceeded.

10 years agoMaintenance: check release notes on packaging
Amos Jeffries [Tue, 9 Dec 2014 16:40:40 +0000 (08:40 -0800)] 
Maintenance: check release notes on packaging

10 years agoPrep for 3.5.0.3 and 3.4.10
Amos Jeffries [Tue, 9 Dec 2014 14:03:14 +0000 (06:03 -0800)] 
Prep for 3.5.0.3 and 3.4.10

10 years agoUpdate localnet definition for RFC 6890
Amos Jeffries [Mon, 8 Dec 2014 11:25:58 +0000 (03:25 -0800)] 
Update localnet definition for RFC 6890

RFC 6890 details updated IP address reservations for Carrier-Grade NAT
and confirms registration of the "this" network range legitimacy amongst
other non-relevant ddress range allocations.

10 years agoTypo in rev.13747
Amos Jeffries [Sun, 7 Dec 2014 16:13:45 +0000 (08:13 -0800)] 
Typo in rev.13747

10 years agourl_lfs_rewrite: Update man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 15:21:44 +0000 (07:21 -0800)] 
url_lfs_rewrite: Update man(8) documentation

10 years agoext_wbinfo_group_acl: Update man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 15:06:43 +0000 (07:06 -0800)] 
ext_wbinfo_group_acl: Update man(8) documentation

10 years agoext_sql_session_acl: Update man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 14:55:08 +0000 (06:55 -0800)] 
ext_sql_session_acl: Update man(8) documentation

10 years agoext_delayer_acl: Update man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 14:47:32 +0000 (06:47 -0800)] 
ext_delayer_acl: Update man(8) documentation

10 years agobasic_pop3_auth: Add man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 14:40:00 +0000 (06:40 -0800)] 
basic_pop3_auth: Add man(8) documentation

10 years agobasic_msnt_multi_domain_auth: Add man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 14:26:56 +0000 (06:26 -0800)] 
basic_msnt_multi_domain_auth: Add man(8) documentation

Also, update helper to use command-line parameters instead of hard-coded
configuration for most options.

10 years agobasic_db_auth: update man(8) documentation
Amos Jeffries [Sun, 7 Dec 2014 14:22:16 +0000 (06:22 -0800)] 
basic_db_auth: update man(8) documentation

10 years agoFix bootstrap.sh dependency on SPONSORS.list
Amos Jeffries [Sun, 7 Dec 2014 11:13:37 +0000 (00:13 +1300)] 
Fix bootstrap.sh dependency on SPONSORS.list

bootstrap.sh is distributed in tarballs and may be used by packagers for
various reasons. It does not need to unconditionally replace SPONSORS.

10 years agoAdd URL-rewriter based on local file existence
Amos Jeffries [Sat, 6 Dec 2014 13:43:32 +0000 (05:43 -0800)] 
Add URL-rewriter based on local file existence

Not exactly new. The basic code for this has been bundled with Squid in
contrib/ since 1996.

* Shuffle the contrib/rredir.* helpers code into helpers/url_rewrite/LFS/

* Add missing copyright boilerplate, CONTRIBUTORS and CREDITS entries

* Add Makefile support to install the perl helper

Redesign perl helper:

* update for strict Perl syntax

* update to current (Squid-3.4+) helper protocol

* replace hard-coded rewriter config with flexible command-line
  parameters

* add debug support

* add concurrency support

* add helper documentation

10 years agoDocs: drop old README.wccpv2
Amos Jeffries [Sat, 6 Dec 2014 06:42:33 +0000 (22:42 -0800)] 
Docs: drop old README.wccpv2

10 years agoBoilerplate: add several missing copyright blurbs
Amos Jeffries [Sat, 6 Dec 2014 06:33:37 +0000 (22:33 -0800)] 
Boilerplate: add several missing copyright blurbs

10 years agoHTTP/2: Add method PRI registration
Amos Jeffries [Fri, 5 Dec 2014 13:07:30 +0000 (05:07 -0800)] 
HTTP/2: Add method PRI registration

10 years agoHTTP/2: handle 'PRI' method found in HTTP/1.x traffic
Amos Jeffries [Fri, 5 Dec 2014 13:02:46 +0000 (05:02 -0800)] 
HTTP/2: handle 'PRI' method found in HTTP/1.x traffic

draft-ietf-httpbis-http2-16 section 11.6 registers the method PRI.
"
  This method is never used by an actual client.
  This method will appear to be used when an HTTP/1.1 server or
  intermediary attempts to parse an HTTP/2 connection preface.
"

If seen with a non-2.0 version number it means some client or proxy has
mishandled an HTTP/2.0 connection preface and corrupted the traffic.

10 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Thu, 4 Dec 2014 18:11:26 +0000 (18:11 +0000)] 
SourceFormat Enforcement

10 years agoFix handling of regex \ characters
Amos Jeffries [Thu, 4 Dec 2014 16:06:59 +0000 (08:06 -0800)] 
Fix handling of regex \ characters

10 years agourl_rewrite_timeout directive part2: fix to allow complie when adaptation is not
Christos Tsantilas [Thu, 4 Dec 2014 16:01:10 +0000 (18:01 +0200)] 
url_rewrite_timeout directive part2: fix to allow complie when adaptation is not
 enabled

10 years agourl_rewrite_timeout directive
Christos Tsantilas [Thu, 4 Dec 2014 14:00:17 +0000 (16:00 +0200)] 
url_rewrite_timeout directive

This patch adds the url_rewrite_timeout directive.

When configured, Squid keeps track of active requests and treats timed out
requests to redirector as failed requests.

url_rewrite_timeout format:

  url_rewrite_timeout timeout time-units on_timeout=<fail|bypass|retry|use_configured_response> [response=<quoted-string>]

The url_rewrite_timeout directive can accept the on_timeout argument to allow
user configure the action when the helper request times out.
The available actions are:

     fail: squid return a ERR_GATEWAY_FAILURE error page
     bypass: the url is not rewritten.
     retry: retry the request to helper
     use_configured_response: use a response which can be configured using the
         the response= option

Example usage:
    url_rewrite_timeout 30 seconds \
        on_timeout=use_configured_response \
        response="OK url=http://example.com/support"

This is a Measurement Factory project

10 years agoHTTP/2: Support 421 (Misdirected Request) status code
Amos Jeffries [Wed, 3 Dec 2014 15:13:08 +0000 (07:13 -0800)] 
HTTP/2: Support 421 (Misdirected Request) status code

Add support for status 421 responses. Squid is forbidden from generating
messages with this status in its role as proxy, however we expect to see
it being produced in responses by HTTP/2 servers in traffic from HTTP
2.0<->1.1 gateways.

We also MAY emit it on future reverse-proxy responses in the event of a
ERR_CANNOT_FORWARD message.

10 years agoBug 4135: Support \-escaped character in regex patterns
Amos Jeffries [Wed, 3 Dec 2014 14:12:12 +0000 (06:12 -0800)] 
Bug 4135: Support \-escaped character in regex patterns

Squid cannot parse regex patterns as quoted strings since the pattern may
itself contain quote characters as part of the syntax.

Since we updated the squid.conf ConfigParser it is now possible to
handle regex patterns containing quoted-pair (\-escaped) characters
properly.

Add support for escaping by detecting the '\' characters as token
delimiters, and explicitly skipping the following character regardless
of whether it is a SP or not.

Escape detection is only added during parsing of regex tokens or
files listing regex patterns.

10 years agoFTP FEAT error handling
Christos Tsantilas [Mon, 1 Dec 2014 17:22:07 +0000 (19:22 +0200)] 
FTP FEAT error handling

Some FTP severs respond to a FEAT command with 5xx status code. Squid sends
an invalid response in these cases which can confuse the client.

This patch fixes Squid to always send a valid 211 reply to client which
lists at least the EPSV and EPRT ftp commands which supported by Squid
regardless of the origin server support.

This patch also fixes a memory leak when FEAT replies processed.

This is a Measurement Factory project

10 years agoAdd statistics couting for missing mem_obj (bug 4131)
Amos Jeffries [Mon, 1 Dec 2014 12:48:38 +0000 (04:48 -0800)] 
Add statistics couting for missing mem_obj (bug 4131)

10 years agoBug 4131: SIGSEGV at store.cc:962 content_length > store_maxobjsize
Alex Rousskov [Mon, 1 Dec 2014 11:59:46 +0000 (03:59 -0800)] 
Bug 4131: SIGSEGV at store.cc:962 content_length > store_maxobjsize

10 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Mon, 1 Dec 2014 06:11:47 +0000 (06:11 +0000)] 
SourceFormat Enforcement

10 years agoSourceLayout: shuffle memory pool allocators to mem/libmem.la
Amos Jeffries [Mon, 1 Dec 2014 04:05:48 +0000 (20:05 -0800)] 
SourceLayout: shuffle memory pool allocators to mem/libmem.la

There are no logic changes in this patch.

* Some code is using the 'old' or internal pool allocation APIs
  directly. These have been marked with XXX for future logic
  changes to update.

* The memory pools API and MEMPROXY_CLASS() definition are now
  available through the mem/forward.h header file.

* Mem:: namespace has been added for library contents.

* MemAllocatorProxy class has been moved into Mem:: namespace
  and extracted from mem.cc but should only be used via the
  MEMPROXY_CLASS() macro.

* Extended the memory STUB file to define all mem/forward.h
  symbols and a few others needed currently by code using the
  older deprecated memory APIs.

Also, some time API functions exported by util.h instead of
SquidTime.h have been marked as needing work.

10 years agoBug 4148: external_acl_type header format does not accept the new libformat syntax
Jorge Ivan Burgos Aguilar [Wed, 26 Nov 2014 10:23:03 +0000 (02:23 -0800)] 
Bug 4148: external_acl_type header format does not accept the new libformat syntax

10 years agoBug 4033: Rebuild corrupted ssl_db/size file
Christos Tsantilas [Tue, 25 Nov 2014 16:46:38 +0000 (18:46 +0200)] 
Bug 4033: Rebuild corrupted ssl_db/size file

The certificate db size file may become empty (for reasons beyond Squid
control such as server reboots, and possibly some unknown Squid bugs).
When it becomes empty, all ssl_crtd helpers (and then Squid) quit. This
change is required to make ssl_crtd more robust by recovering lost db
size information.

This patch:
 - Adds the "size" rebuild operation in CertificateDB and ssl_crtd
   daemon. Rebuild ssl_db/size file if it is empty:
     * Inside Ssl::CertificateDb::check method
     * When a CertificateDB operation try to read size from ssl_db/size file

 - If no fs_block_size parameter given for CertificateDB then consider a
   default value of 2048. Currently set to 0, which is may cause segfault to
   ssl_crtd daemon.

This is a Measurement Factory project

10 years agoRevert splay-specific pieces of rev.13720
Amos Jeffries [Sat, 22 Nov 2014 06:10:20 +0000 (22:10 -0800)] 
Revert splay-specific pieces of rev.13720

As suspected several important pieces of code depend on the SplayNode
this pointer being NUL at times.

10 years agoRevert r12298 workaround for Bug 3613
Amos Jeffries [Fri, 21 Nov 2014 18:26:17 +0000 (10:26 -0800)] 
Revert r12298 workaround for Bug 3613

Now that Squid is starting to utilize C++11 features we need to enable
them in all compilers. If the problem still exists then we need to find
a better solution to bug 3613.

10 years agoCleanup: remove invalid comparisons of 'this' with NULL
Amos Jeffries [Fri, 21 Nov 2014 18:14:10 +0000 (10:14 -0800)] 
Cleanup: remove invalid comparisons of 'this' with NULL

... which are invalid in C++ and always equate (this!=NULL) to true.

Clang 3.5 refuses to build code containing these invalid comparisons.

10 years agoHTCP: fix memory initialization errors
Amos Jeffries [Fri, 21 Nov 2014 18:09:06 +0000 (10:09 -0800)] 
HTCP: fix memory initialization errors

memset() used to initialize HTCP objects made sense when they were
structs. But now they are classes proper constructors need to be used
to avoid memset() erasing vtable and other important areas. It also
helps to reduce code and improve performance during init a tiny bit.

memset() errors found by Clang 3.5

10 years agoFix typo in rev.13711
Amos Jeffries [Fri, 21 Nov 2014 14:56:35 +0000 (06:56 -0800)] 
Fix typo in rev.13711

10 years agoBug 4146: workaround SSL Bump crash on Linux
Amos Jeffries [Fri, 21 Nov 2014 10:07:05 +0000 (02:07 -0800)] 
Bug 4146: workaround SSL Bump crash on Linux

10 years agoFix build errors on CentOS 7 in rev.13712
Amos Jeffries [Fri, 21 Nov 2014 04:33:21 +0000 (20:33 -0800)] 
Fix build errors on CentOS 7 in rev.13712

It turns out the RHEL and CentOS 7 STL definition does not quite match
up to official documentation of what their GCC version supports. In
particular the use of const_iterator on std::list containers.

Use auto instead of an explicit iterator. Allowing the compiler to select
whichever iterator is available and will work.

10 years agoBug 3902: Docs: external_acl_type cache hash key
Amos Jeffries [Thu, 20 Nov 2014 15:36:59 +0000 (07:36 -0800)] 
Bug 3902: Docs: external_acl_type cache hash key

10 years agoBug 4145: squid_endian.h compile errors with OpenBSD 5.6
Amos Jeffries [Thu, 20 Nov 2014 12:24:30 +0000 (04:24 -0800)] 
Bug 4145: squid_endian.h compile errors with OpenBSD 5.6

* Remove unused big-endian macros.

* Stop making assumptions about little-endian symbols existence. Test
  each one explicitly and define only as necessary.

* Add support for systems with endian.h available.

* Move Endian hacks to libntlmauth which is the only code using them.
  Also, build only if NTLM is required.