]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoFix leaked TcpAcceptor job on reconfiguration
Alex Rousskov [Mon, 2 Jun 2014 05:09:38 +0000 (22:09 -0700)] 
Fix leaked TcpAcceptor job on reconfiguration

... by monitoring and reacting to the listening socket closure.

Every job that waits for Comm I/O must have a FD closure handler.

11 years agoFix leak of ACLs related to adaptation access rules
Alex Rousskov [Mon, 2 Jun 2014 04:54:19 +0000 (21:54 -0700)] 
Fix leak of ACLs related to adaptation access rules

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 2 Jun 2014 00:15:10 +0000 (18:15 -0600)] 
SourceFormat Enforcement

11 years agoCopy compat from compat/strtoll.c to Tokenizer.cc
Francesco Chemolli [Sun, 1 Jun 2014 21:04:31 +0000 (23:04 +0200)] 
Copy compat from compat/strtoll.c to Tokenizer.cc

11 years agoMerge: SBuf-based Tokenizer
Francesco Chemolli [Sun, 1 Jun 2014 16:21:30 +0000 (18:21 +0200)] 
Merge: SBuf-based Tokenizer

11 years agoUse SBuf::size_type instead of int64_t on message segment sizes
Amos Jeffries [Sun, 1 Jun 2014 15:25:02 +0000 (08:25 -0700)] 
Use SBuf::size_type instead of int64_t on message segment sizes

11 years agoUnit-test http1::RequestParser constructor
Amos Jeffries [Sun, 1 Jun 2014 15:10:15 +0000 (08:10 -0700)] 
Unit-test http1::RequestParser constructor

Also fix several bugs identified by the new test.

11 years agoMerged from trunk
Francesco Chemolli [Sun, 1 Jun 2014 14:17:37 +0000 (16:17 +0200)] 
Merged from trunk

11 years agoDocument token() behaviour at end-of-buffer
Amos Jeffries [Sun, 1 Jun 2014 13:53:17 +0000 (06:53 -0700)] 
Document token() behaviour at end-of-buffer

11 years agoCleanup: make Parser::buf private
Amos Jeffries [Sun, 1 Jun 2014 13:18:33 +0000 (06:18 -0700)] 
Cleanup: make Parser::buf private

11 years agoPolish: constify new local variables
Amos Jeffries [Sun, 1 Jun 2014 12:44:54 +0000 (05:44 -0700)] 
Polish: constify new local variables

11 years agoDocs: update reference to RFC7230 (draft-ietf-httpbis-p1-messaging-26)
Amos Jeffries [Sun, 1 Jun 2014 12:38:03 +0000 (05:38 -0700)] 
Docs: update reference to RFC7230 (draft-ietf-httpbis-p1-messaging-26)

11 years agoUpdate HTTP-version parsing with RFC 7230 octet magics
Amos Jeffries [Sun, 1 Jun 2014 11:53:02 +0000 (04:53 -0700)] 
Update HTTP-version parsing with RFC 7230 octet magics

RFC 7230 replaces RFC 2616 and defines HTTP-version for HTTP/1 protocol
as having exact case-sensitive octets "HTTP/1." and a variable minor
version consisting of exactly one DIGIT.

This allows us to use magic-octet matching to detect the HTTP-version
field and remove slow matching logics for unknown version and HTTP major
version number (DIGIT '1').

11 years agoDocument c_str() performane impacts
Amos Jeffries [Sun, 1 Jun 2014 09:53:36 +0000 (02:53 -0700)] 
Document c_str() performane impacts

11 years agoImport Tokenizer updates
Amos Jeffries [Sun, 1 Jun 2014 08:57:43 +0000 (01:57 -0700)] 
Import Tokenizer updates

11 years agoCleanup: de-duplicate auth_param program parameter code
Amos Jeffries [Sat, 31 May 2014 17:00:05 +0000 (10:00 -0700)] 
Cleanup: de-duplicate auth_param program parameter code

Moves the "program" parse and dump code into Auth::Config.

Also, changes API to Auth::Config::dump() to not dump any config settings
for schemes which are not configured with a "program". Including scheme
specific settings.

Also, fixes missing Digest "utf8" parameter in config dump.

11 years agoDocs: update auth_param documentation
Amos Jeffries [Sat, 31 May 2014 16:22:44 +0000 (09:22 -0700)] 
Docs: update auth_param documentation

11 years agoCleanup: de-duplicate auth_param realm configuration
Amos Jeffries [Sat, 31 May 2014 15:51:14 +0000 (08:51 -0700)] 
Cleanup: de-duplicate auth_param realm configuration

Move realm parse and config dump logics to Auth::Config base object.
This de-duplicates Basic, Digest (and future schemes ie Bearer) config
processing code.  Also makes realm available to NTLM and Negotiate
schemes, although at present it remains unused by those schemes.

Also, convert the realm parameter string to an SBuf. Removing the need
for some memory maintenance code.

11 years agoCleanup Tokenizer::token
Amos Jeffries [Fri, 30 May 2014 12:41:24 +0000 (05:41 -0700)] 
Cleanup Tokenizer::token

* remove incorrect comment

* return false with no side effects if end of buffer is reached inside
  the token, unless \0 is defined as one of the delimiters.

11 years agoMerged from trunk
Francesco Chemolli [Fri, 30 May 2014 09:52:11 +0000 (11:52 +0200)] 
Merged from trunk

11 years agoFixed Parser::Tokenizer::int64, added more test cases
Francesco Chemolli [Fri, 30 May 2014 09:42:45 +0000 (11:42 +0200)] 
Fixed Parser::Tokenizer::int64, added more test cases

11 years agomerge from trunk r13423
Christos Tsantilas [Thu, 29 May 2014 17:47:48 +0000 (20:47 +0300)] 
merge from trunk r13423

11 years agomerge from trunk r13423
Christos Tsantilas [Thu, 29 May 2014 17:40:34 +0000 (20:40 +0300)] 
merge from trunk r13423

11 years agomerge from trunk
Christos Tsantilas [Thu, 29 May 2014 17:40:02 +0000 (20:40 +0300)] 
merge from trunk

11 years agoFix Ftp::Gateway::ServerStateData::savedReply initialization inside Ftp::Gateway...
Christos Tsantilas [Thu, 29 May 2014 17:03:46 +0000 (20:03 +0300)] 
Fix Ftp::Gateway::ServerStateData::savedReply initialization inside Ftp::Gateway::ServerStateData::ServerStateData constructor

Ftp::Gateway::ServerStateData::savedReply::messages is a wordlist not a boolean

11 years agoCleanup: de-duplicate handling of auth_param 'children'
Amos Jeffries [Wed, 28 May 2014 11:38:34 +0000 (04:38 -0700)] 
Cleanup: de-duplicate handling of auth_param 'children'

11 years agoDocs: HTTP 308 status is now RFC 7238
Amos Jeffries [Wed, 28 May 2014 10:50:23 +0000 (03:50 -0700)] 
Docs: HTTP 308 status is now RFC 7238

11 years agoPeek and Splice: Interception support
Christos Tsantilas [Tue, 27 May 2014 09:19:57 +0000 (12:19 +0300)] 
Peek and Splice: Interception support

11 years agoPolish
Amos Jeffries [Tue, 27 May 2014 08:34:55 +0000 (01:34 -0700)] 
Polish

11 years agoUnit test for sub-string parsing
Amos Jeffries [Tue, 27 May 2014 08:34:00 +0000 (01:34 -0700)] 
Unit test for sub-string parsing

11 years agoMerged from trunk
Francesco Chemolli [Tue, 27 May 2014 08:23:05 +0000 (10:23 +0200)] 
Merged from trunk

11 years agoClarify Parser::Tokenizer::int64 documentation, add one test case.
Francesco Chemolli [Mon, 26 May 2014 14:06:07 +0000 (16:06 +0200)] 
Clarify Parser::Tokenizer::int64 documentation, add one test case.

11 years agoImplement Parser::Tokenizer::int64 and unit tests
Francesco Chemolli [Mon, 26 May 2014 13:04:01 +0000 (15:04 +0200)] 
Implement Parser::Tokenizer::int64 and unit tests

11 years agoFixes to allow compile with older openSSL versions
Christos Tsantilas [Fri, 23 May 2014 15:29:40 +0000 (18:29 +0300)] 
Fixes to allow compile with older openSSL versions

11 years agoRevised ftp-gw timeout handling to cope with very long data downloads/uploads
Alex Rousskov [Fri, 23 May 2014 06:34:59 +0000 (00:34 -0600)] 
Revised ftp-gw timeout handling to cope with very long data downloads/uploads
that triggered bogus ctrl connection timeouts due to ctrl channel inactivity.

Unset ctrl timeout when we are done waiting for the ctrl response
(ServerStateData::readControlReply).

Removed code setting data timeout from Ftp::ServerStateData::dataRead()
because the data timeout is set in ServerStateData::maybeReadVirginBody() that
dataRead calls to read data.

Removed switchTimeoutToDataChannel() from
Ftp::Gateway::ServerStateData::startDataDownload because
  * ctrl timeout should be cleared when we are done waiting for the ctrl
    response (ServerStateData::readControlReply) and
  * data timeout should be set when we start waiting for the data
    (ServerStateData::maybeReadVirginBody)

Unset channel timeout in FtpChannel::forget().

Same as ftp-gw r12798.

11 years agoMerged from trunk (r13356).
Alex Rousskov [Fri, 23 May 2014 06:11:56 +0000 (00:11 -0600)] 
Merged from trunk (r13356).
Needs more work to handle FTP adaptation failures better.

11 years agoRenamed atstep ACL to at_step to be more consistent with other ACL names.
Alex Rousskov [Thu, 22 May 2014 20:55:56 +0000 (14:55 -0600)] 
Renamed atstep ACL to at_step to be more consistent with other ACL names.

11 years agoPolished atstep and ssl_bump documentation.
Alex Rousskov [Thu, 22 May 2014 20:50:41 +0000 (14:50 -0600)] 
Polished atstep and ssl_bump documentation.

11 years agoInterim: start implementing Parser::Tokenizer::int64
Francesco Chemolli [Thu, 22 May 2014 20:37:12 +0000 (22:37 +0200)] 
Interim: start implementing Parser::Tokenizer::int64

11 years agoFix Tokenizer::token
Francesco Chemolli [Thu, 22 May 2014 17:30:42 +0000 (19:30 +0200)] 
Fix Tokenizer::token

11 years agoFix atstep ACL values to match SslPeekAndSplice wiki page
Christos Tsantilas [Thu, 22 May 2014 15:51:27 +0000 (18:51 +0300)] 
Fix atstep ACL values to match SslPeekAndSplice wiki page

Change the possible atstep ACL values from step1, step2, step3 to  SslBump1,
SslBump2, SslBump3 to match SslPeekAndSplice wiki page description.

11 years agomerge from trunk r13421
Christos Tsantilas [Thu, 22 May 2014 15:38:42 +0000 (18:38 +0300)] 
merge from trunk r13421

11 years agoPeek and Splice: New ACL lists configuration
Christos Tsantilas [Thu, 22 May 2014 12:00:50 +0000 (15:00 +0300)] 
Peek and Splice: New ACL lists configuration

This patch:
  - removes ssl_bump_peeked access list

  - Defines three steps of the SSL bumping processing:
       step1: Get TCP-level and CONNECT info. Evaluate ssl_bump and perform
              the first matching action (splice, bump, peek, stare, terminate,
              or err)
       step2: Get SSL Client Hello info. Evaluate ssl_bump and perform the
              first matching action (splice, bump, peek, stare, terminate,
              or err). Peeking usually prevents future bumping. Staring
              usually prevents future splicing.
       step3: Get SSL Server Hello info. Evaluate ssl_bump and perform the
              first matching action (splice, bump, terminate, or err).
              In most cases, the only remaining choice at this step is
              whether to terminate the connection. The splicing or bumping
              decision is usually dictated by either peeking or staring at the
              previous step.

  - The ssl_bump ACLs list may evaluated in all SSL Bumping processing steps to
    take a decision for the next step:
       splice or none: Become a TCP tunnel without decoding the connection.
       bump:   Establish a secure connection with the server and, using a
               mimicked server certificate, with the client
       peek:   Receive client (step1) or server (step2) certificate while
               preserving the possibility of splicing the connection. Peeking
               at the server certificate usually precludes future bumping of
               the connection.
       stare:  Receive client (step1) or server (step2) certificate while
               preserving the possibility of bumping the connection. Staring at
               the server certificate usually precludes future splicing of the
               connection.
       terminate or err: Close client and server connections.
    All actions except peek and stare correspond to final decisions: Once an
    ssl_bump directive with a final action matches, no further ssl_bump
    evaluations will take place, regardless of the current processing step.

  - Add the atstep acl to match against SSL bumping step: "step1", "step2" or
    "step3"

Current Implementation details:
---------------------------------

 1) If the "peek" mode selected in step2 then the client hello message
    forwarded to server. If this mode selected in step2 the splice is always
    possible and bump maybe is not possible (in most cases where the client uses
    different SSL client library implementation)

 2) If the "stare" mode selected in step2 then the squid builds a new
    hello message, which try to mimic, if it is possible , client hello message.
    If stare selected in step2 the bump is always possible, but splice maybe is
    not possible any more.

 3) In step3 if bump decided, and bump is not possible any more then squid
    is always splicing.

 4) In step3 if splice decided but splice is not possible any more then
    squid is always bumping.

 5) Because of (3) and (4), in practice, if firefox browser used with
    peek mode, squid always splice the connection, because squid/openSSL
    does not support the firefox SSL features reported in client hello message.

 6) In step2 if ACL list evaluation result to terminate or err then we just
    close client connection. If the check result to ssl-bump then just bump.
    If check result to client-first, server-first, then bump the connection
    else do peek/stare.

 7) In step3 the ssl_bump ACL list evakuation result client-first, server-first,
    bump or peek result to bumping (if bumping is possible).

Example configurations:

acl step1 atstep  Step1
acl step2 atstep  Step2
acl step3 atstep  Step3

ssl_bump peek step1 all
ssl_bump peek step2 all
ssl_bump splice step3 all

11 years agoBug 4056: assertion MemPools[type] from netdbExchangeStart()
Amos Jeffries [Thu, 22 May 2014 10:13:57 +0000 (03:13 -0700)] 
Bug 4056: assertion MemPools[type] from netdbExchangeStart()

11 years agoCleanup: document and rename Auth::UserRequest::module_start to startHelperLookup
Amos Jeffries [Thu, 22 May 2014 09:12:48 +0000 (02:12 -0700)] 
Cleanup: document and rename Auth::UserRequest::module_start to startHelperLookup

11 years agoCleanup: drop Auth::User::proxy_auth_list header cache
Amos Jeffries [Thu, 22 May 2014 06:04:05 +0000 (23:04 -0700)] 
Cleanup: drop Auth::User::proxy_auth_list header cache

This list/cache was originally used to short-circuit auth helper lookups
based on previousy seen [Proxy-]Authorization header strings.
However, that permitted replay attacks in most auth schemes and has been
replaced by scheme-specific mechanisms:

* Basic and Digest credentials are cached in the global user name cache
  wih additional nonce/password comparisons to verify located entries.

* NTLM and Negotiate credentials are cached in the ConnStateData with
  exact-match comparison done to verify tokens.

11 years agoDocs: mention -k restart in command line usage
Amos Jeffries [Wed, 21 May 2014 17:50:51 +0000 (10:50 -0700)] 
Docs: mention -k restart in command line usage

11 years agoDocs: formalize Tokenizer uniform method behaviour
Amos Jeffries [Wed, 21 May 2014 17:46:04 +0000 (10:46 -0700)] 
Docs: formalize Tokenizer uniform method behaviour

11 years ago"ssl_bump none" mode crashes squid
Christos Tsantilas [Wed, 21 May 2014 06:29:38 +0000 (09:29 +0300)] 
"ssl_bump none" mode crashes squid

After r13324 patch the SBuf argument of the ConnStateData::handleReadData member
is used only to check if ConnStateData::In::buf is correctly filled with read
data. ConnStateData::handleReadData considers that the data already written
in ConnStateData::in.buf and checks if the passed Sbuf argument is the
ConnStateData::in.buf:

bool ConnStateData::handleReadData(SBuf *buf)
{
   assert(buf == &in.buf);
   .....

The httpsSslBumpAccessCheckDone function needs to write the CONNECT request
generated internally to force tunnel mode, in ConnStateData::In::buf and then
call ConnStateData::handleReadData method.

11 years agoBug 4065: round-robin neighbor selection with unequal weights
Mike Mitchell [Tue, 20 May 2014 17:08:56 +0000 (10:08 -0700)] 
Bug 4065: round-robin neighbor selection with unequal weights

11 years agoFix file include order and paths
Amos Jeffries [Tue, 20 May 2014 16:11:27 +0000 (09:11 -0700)] 
Fix file include order and paths

11 years agoPolish namespace usage in .cc
Amos Jeffries [Tue, 20 May 2014 16:08:59 +0000 (09:08 -0700)] 
Polish namespace usage in .cc

11 years agoUpdate documentation
Amos Jeffries [Tue, 20 May 2014 16:06:09 +0000 (09:06 -0700)] 
Update documentation

11 years agoAdd optional limit parameter to Tokenizer::prefix()
Amos Jeffries [Tue, 20 May 2014 11:35:49 +0000 (04:35 -0700)] 
Add optional limit parameter to Tokenizer::prefix()

11 years agoFix first-line debug display after dropping parsedCount_
Amos Jeffries [Tue, 20 May 2014 11:07:44 +0000 (04:07 -0700)] 
Fix first-line debug display after dropping parsedCount_

11 years agoCleanup: drop parsedCount_ tracking
Amos Jeffries [Tue, 20 May 2014 11:00:04 +0000 (04:00 -0700)] 
Cleanup: drop parsedCount_ tracking

Now that parse() is receiving a buffer directly we no longer have to
track how many bytes have been consumed by the parse. It can be
calculated by comparing the current and original SBuf.

11 years agoCleanup some typos
Amos Jeffries [Tue, 20 May 2014 10:46:54 +0000 (03:46 -0700)] 
Cleanup some typos

11 years agoPolish: class file shuffling for guidelines
Amos Jeffries [Tue, 20 May 2014 10:21:14 +0000 (03:21 -0700)] 
Polish: class file shuffling for guidelines

11 years agoSimplify Http1::Parser API and buffer management
Amos Jeffries [Tue, 20 May 2014 07:20:38 +0000 (00:20 -0700)] 
Simplify Http1::Parser API and buffer management

11 years agoCleanup debug output
Amos Jeffries [Tue, 20 May 2014 03:45:00 +0000 (20:45 -0700)] 
Cleanup debug output

* fix debug display of sections parsed, hiding followup bytes in buffer.

* removes several duplicate dumps of message bytes.

* add mimeHeader() accessor to reduce c_str() usage when accessing mime
  header content.

11 years agoPolish SBuf API use in prepareTransparentURL()
Amos Jeffries [Tue, 20 May 2014 03:08:51 +0000 (20:08 -0700)] 
Polish SBuf API use in prepareTransparentURL()

11 years agoCleanup: SBuf report how many bytes consume()d
Amos Jeffries [Mon, 19 May 2014 06:06:36 +0000 (23:06 -0700)] 
Cleanup: SBuf report how many bytes consume()d

11 years agoHTTP/1 message with no mime headers is valid
Amos Jeffries [Sun, 18 May 2014 14:01:48 +0000 (07:01 -0700)] 
HTTP/1 message with no mime headers is valid

11 years agoFix infinite parse loop on partial request reads
Amos Jeffries [Sun, 18 May 2014 10:36:05 +0000 (03:36 -0700)] 
Fix infinite parse loop on partial request reads

parseHttpRequest() returns NULL on incomplete parse. This case was not
exiting the loop to parse multiple requests. As a result traffic would
only receive a response if the request headers were received entirely
within one read(2) event. Pipelined requests received over multiple hung.

11 years agoMerge from trunk r13414
Amos Jeffries [Sat, 17 May 2014 05:49:04 +0000 (22:49 -0700)] 
Merge from trunk r13414

11 years agoFix outstanding build issues and parser audit results
Amos Jeffries [Thu, 15 May 2014 10:44:05 +0000 (03:44 -0700)] 
Fix outstanding build issues and parser audit results

* Give SBuf I/O buffer directly to Http1::RequestParser

* Redesign parser state engine to represent the current state
  being parsed instead of previous completed. This allows much
  more incremental resume of a parse and reliable consume() of
  the input buffer as sections complete instead of complex byte
  accounting outide the parser.

* Maintain an internal counter of bytes parsed and consumed by
  the parser instead of a buffer offset. This allows much more
  reliable positioning of the state/section boundaries.

* Remove erroneous fprintf debug left in previous commit.

* Redesign HttpRequestMethod constructor to drop end parameter.

* Redesign all parser unit tests. Marking RFC non-compliance
  for future fixing.

11 years agoBug 4050: Segfault in CommSelectEngine::checkEvents on helper response
Alex Rousskov [Thu, 15 May 2014 07:32:10 +0000 (00:32 -0700)] 
Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response

11 years agoRegression: segfault logging with %tg format specifier
Steve Hill [Tue, 13 May 2014 10:27:18 +0000 (03:27 -0700)] 
Regression: segfault logging with %tg format specifier

In trunk rev.13387 Token class data member was converted from union to
struct without adding initializer for the timespec field.

timespec is a redundant field anyway, just remove it.

11 years agoMerged ext_delayer_acl
Francesco Chemolli [Mon, 12 May 2014 16:35:23 +0000 (18:35 +0200)] 
Merged ext_delayer_acl

11 years agoRenamed delayer helper for subst_perlshell compatibility
Francesco Chemolli [Mon, 12 May 2014 16:22:30 +0000 (18:22 +0200)] 
Renamed delayer helper for subst_perlshell compatibility

11 years agoMerged from trunk
Francesco Chemolli [Mon, 12 May 2014 16:06:11 +0000 (18:06 +0200)] 
Merged from trunk

11 years agoReverted r13409 due to incompatibility with BSD pmake
Francesco Chemolli [Mon, 12 May 2014 16:02:58 +0000 (18:02 +0200)] 
Reverted r13409 due to incompatibility with BSD pmake

11 years agoBug 2554: 32-bit wrap in AUFS counters
Amos Jeffries [Mon, 12 May 2014 12:49:12 +0000 (05:49 -0700)] 
Bug 2554: 32-bit wrap in AUFS counters

11 years agoMerged from trunk
Francesco Chemolli [Mon, 12 May 2014 09:43:32 +0000 (11:43 +0200)] 
Merged from trunk

11 years agoRenamed installed script to ext_delayer_acl
Francesco Chemolli [Mon, 12 May 2014 09:43:23 +0000 (11:43 +0200)] 
Renamed installed script to ext_delayer_acl

11 years agoChanged subst_perlshell Makefile recipe to use the actual source file name
Francesco Chemolli [Mon, 12 May 2014 09:42:30 +0000 (11:42 +0200)] 
Changed subst_perlshell Makefile recipe to use the actual source file name

11 years agoIntegrate delayer helper with build system
Francesco Chemolli [Sun, 11 May 2014 19:12:35 +0000 (21:12 +0200)] 
Integrate delayer helper with build system

11 years agoCheck for PURGE method using method enum instead of strcmp()
Amos Jeffries [Fri, 9 May 2014 17:32:25 +0000 (10:32 -0700)] 
Check for PURGE method using method enum instead of strcmp()

Removes one minor but needless drag on startup and reconfigure speed.

11 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Fri, 9 May 2014 15:19:40 +0000 (18:19 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>
Avoid on-exit crashes when adaptation is enabled.

After trunk r13269 (Vector refactor) destroyed vector objects still have
positive item counts. This exposes use-after-delete bugs. In this particular
case, global adaptation rule/group/service arrays are destructed by global
destruction sequence first and then again by Adaptation::*::TheConfig objects
destructors.

This change avoiding static destruction order dependencies by storing those
global adaptation arrays on heap.

11 years agoTemporary fix for segmentation faults in FwdState::serverClosed debugging.
Alex Rousskov [Fri, 9 May 2014 04:45:54 +0000 (22:45 -0600)] 
Temporary fix for segmentation faults in FwdState::serverClosed debugging.

See r13404 for details.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 9 May 2014 00:14:30 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoTemporary fix for segmentation faults in FwdState::serverClosed.
Alex Rousskov [Thu, 8 May 2014 22:43:01 +0000 (16:43 -0600)] 
Temporary fix for segmentation faults in FwdState::serverClosed.

r13388 (cache_peer standby=N) moved noteUses() call from Comm to FwdState, to
avoid exposing Comm to pconn pools. Unfortunately, the closing handler does
not get a valid FD value when the closing callback shares the Connection
object with the code that called conn->close(). It gets -1. The FD of the
FwdState connection itself is already -1 at that point, for similar reasons.
The code thinks it got a matching FD and calls noteUses() with an invalid FD.

This temporary workaround prevents noteUses() calls when FD is unknown.
Without those calls, pconn usage statistics will be wrong. A different
long-term solution is needed.

11 years agoAllow test suite to override make program via MAKE environment variable
Francesco Chemolli [Thu, 8 May 2014 13:28:08 +0000 (15:28 +0200)] 
Allow test suite to override make program via MAKE environment variable

11 years agoBug 4059: Support redirectors and logging using Squid-2 urlgroup feature
Timo Tseras [Thu, 8 May 2014 10:17:41 +0000 (03:17 -0700)] 
Bug 4059: Support redirectors and logging using Squid-2 urlgroup feature

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 7 May 2014 14:40:05 +0000 (08:40 -0600)] 
SourceFormat Enforcement

11 years agoRelease Notes 3.5: updated helper concurrency status
Amos Jeffries [Wed, 7 May 2014 10:10:42 +0000 (03:10 -0700)] 
Release Notes 3.5: updated helper concurrency status

11 years agoCleanup: Refactor external_acl_type format codes representation
Amos Jeffries [Wed, 7 May 2014 10:05:58 +0000 (03:05 -0700)] 
Cleanup: Refactor external_acl_type format codes representation

Removes enum_external_acl_format::format_type from external_acl.cc
by replacing it with enum Format::ByteCode_t.

Several missing logformat codes related to URL display have been added
to the logformat token set for general use.

Several of the external ACL format codes have been added to
Format::ByteCode_t without equivalent logformat TokenTableEntry's at
this stage as both desirable token naming and access to the data to
produce them generically is unclear.

The external_acl_type parser is updated to accept logformat tokens
wherever an equivalent exists and map directly to the ByteCode_t values.

The mgr:config report dumper is also updated to output the logformat
tokens. But as yet the official deprecation has not been done in
squid.conf.

11 years agoAvoid store_client.cc "entry->swap_filen > -1 || entry->swappingOut()" asserts.
Alex Rousskov [Wed, 7 May 2014 00:35:08 +0000 (18:35 -0600)] 
Avoid store_client.cc "entry->swap_filen > -1 || entry->swappingOut()" asserts.

A client may hit on an incomplete shared memory cache entry. Such entry is
fully backed by the shared memory cache, but the copy of its data in local RAM
may be trimmed. When that trimMemory() happens, StoreEntry::storeClientType()
assumes DISK_CLIENT due to positive inmem_lo, and the store_client constructor
asserts upon discovering that there is no disk backing.

To improve shared cache effectiveness for "being cached" entries, we need to
prevent local memory trimming while the shared cache entry is being filled
(possibly by another worker, so this is far from trivial!) or, better, stop
using the local memory for entries feeding off the shared memory cache. The
latter would also require revising DISK_CLIENT designation to include entries
backed by a shared memory cache.

11 years agoMerge fron trunk rev.13398
Amos Jeffries [Tue, 6 May 2014 17:06:24 +0000 (10:06 -0700)] 
Merge fron trunk rev.13398

11 years agoFix build errors after trunk merge
Amos Jeffries [Tue, 6 May 2014 15:30:17 +0000 (08:30 -0700)] 
Fix build errors after trunk merge

11 years agossl_bump_peeked access list
Christos Tsantilas [Tue, 6 May 2014 09:46:07 +0000 (12:46 +0300)] 
ssl_bump_peeked access list

This access list is a temporary solution for peek-and-splice project and used to
take the final decision "bump" or "splice" in peek-and-splice bumping mode.

This is what this patch try to do:
  - Get Client Hello message
  - Start connection.
  - Inside bio, before write the SSL HELLO message, try to emulate client hello
    message:
     a) extract client hello message features
     b) Check if we are able support client features and if not, splicing is not
        able to be supported.
     c) Creates an SSL object to connect to server and try to set it with
        the extracted features.
        This step currently includes many hacks and modify undocumented SSL
        object members.

extensions)
  - in PeerConnector.cc
      a) If can not be spliced do not splice.
      b) check the ssl_bump_peeked access list to splice or not.

11 years agoSplice implementation
Christos Tsantilas [Tue, 6 May 2014 08:07:06 +0000 (11:07 +0300)] 
Splice implementation

Always splice an SSL connection in peek-and-splice SSL bumping mode.

Currently works only if the openSSL version of client and squid are the same
and compiled to support similar set of features

11 years agourl_fake_rewrite: concurrency channel support
Amos Jeffries [Mon, 5 May 2014 11:56:25 +0000 (04:56 -0700)] 
url_fake_rewrite: concurrency channel support

11 years agoSupport concurrency channels in Digest authentication helpers
Amos Jeffries [Mon, 5 May 2014 08:35:47 +0000 (01:35 -0700)] 
Support concurrency channels in Digest authentication helpers

All bundled digest helpers will now automatically detect the existence
of a concurrecy channel-ID and adjust responses appropriately.

The auth_param children concurrency= parameter can now be set to any
valid value without needing to alter the helper binary. This resolves
issues upgrading to default-on concurrency on the digest auth interface.

11 years agostoreid_file_rewrite: document concurrency handling
Amos Jeffries [Mon, 5 May 2014 06:50:51 +0000 (23:50 -0700)] 
storeid_file_rewrite: document concurrency handling

11 years agoRelease Notes 3.5
Amos Jeffries [Sun, 4 May 2014 15:34:46 +0000 (08:34 -0700)] 
Release Notes 3.5

11 years agoRelease Notes for Squid-3.5
Amos Jeffries [Sat, 3 May 2014 18:22:14 +0000 (12:22 -0600)] 
Release Notes for Squid-3.5

11 years agoFix eCAP to build after patch r13384
Christos Tsantilas [Sat, 3 May 2014 10:53:56 +0000 (13:53 +0300)] 
Fix eCAP to build after patch r13384

The HttpMsg::protocol removed with "Bug 1961: pt1: URL handling redesign" patch,
and as a result the eCAP squid subsystem does not build because used this memberto implement libecap::RequestLine and libecap::StatusLine classes.
The HttpMsg::protocol used to hold the protocol part of the request URI.
However the libecap::FirstLine::protocol() is meant for things like
 * the HTTP-Version part of HTTP messages (in RFC 2616 terminology) or
 * the ICAP-Version part of ICAP messages (in RFC 3507 terminology).
It is not related to the URI.

This patch fix this and now libecap::RequestLine and libecap::StatusLine
implemented to return the protocol information from request or status line
of headers.

11 years agoFix generated HTTP message version labels
Amos Jeffries [Sat, 3 May 2014 10:35:31 +0000 (03:35 -0700)] 
Fix generated HTTP message version labels

Squid being conditionally compliant with RFC 2616 should be handling
HTTP/1.1 at all times unless another version was explicitly received.

This makes the default version number for all generated messages be 1.1
unless the alternative constructor is used or the numeric members are
explicitly set to other values. As a result all Squid generated messages
are labelled correctly as 1.1 by default now.

Fixes message version details sent to ICAP/eCAP on many error or
internally generated responses.

11 years agoFirst implementation of do splice. Works only if the openSSL version of client and...
Christos Tsantilas [Fri, 2 May 2014 15:15:18 +0000 (18:15 +0300)] 
First implementation of do splice. Works only if the openSSL version of client and squid are the same and compiled to support similar set of features