]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years ago3.4.5 SQUID_3_4_5
Amos Jeffries [Fri, 2 May 2014 12:08:22 +0000 (05:08 -0700)] 
3.4.5

10 years agoLogformat annotation fixes
Christos Tsantilas [Fri, 2 May 2014 07:51:33 +0000 (00:51 -0700)] 
Logformat annotation fixes

Currently note values printed with "%note" formating code, which contain non
alphanumeric characters, were quoted and quotes were then escaped, resulting
in bizarre logged rendition of empty or simple values (often received from
various helpers):
      %22-%22
      %22Default_Google%22
      %22pg13,US%22

This patch:
- does not use quotes to print annotations

- allow system admin to define a separator to use for logged
  annotations. The %note logformat accepts the following argument:
     [name][:separator]
  The separator can be one of the ',' ';' or ':'.
  By default, multiple note values are separated with "," and multiple
  notes are separated with "\r\n". When logging named notes with
  %{name}note, the explicitly configured separator is used between note
  values. When logging all notes with %note, the explicitly configured
  separator is used between individual notes. There is currently no way to
  specify both value and notes separators when logging all notes with %note.

- makes the Format::Token::data a struct (now is a union) and initialize
  Format::Token::data data members in Format::Token::Token constructor.

This is a Measurement Factory project

10 years agoResolve 'dying from an unhandled exception: c'
Amos Jeffries [Fri, 2 May 2014 07:49:18 +0000 (00:49 -0700)] 
Resolve 'dying from an unhandled exception: c'

CbcPointer<> is used from code outside of Job protection where it is
safe to use Must(). In order to get a useful backtrace we need to assert
immediately at the point of failure. Particularly necessary since these
are in generic operators used "everywhere" in the code.

10 years agoFix order dependency between cache_dir and maximum_object_size
Anatoli [Fri, 2 May 2014 07:47:32 +0000 (00:47 -0700)] 
Fix order dependency between cache_dir and maximum_object_size

parse_cachedir() has a call to update_maxobjsize() which limits the
store_maxobjsize variable used as the internal maximum_object_size
variable of the store data structure) to the value of maximum_object_size
defined at the moment of execution of this function, for all stores (all
store directories). So if parse for cache_dir is called before
maximum_object_size, we get the effect of the default 4 MB.

BUT, when we get to parse maximum_object_size line(s) after the last
cache_dir, the maximum_object_size option is processed and only shown on
the cachemgr config page without having updated store_maxobjsize.

10 years agoBug 4051: fix inverted test on CONNECT payload existence
Amos Jeffries [Sat, 26 Apr 2014 10:58:22 +0000 (03:58 -0700)] 
Bug 4051: fix inverted test on CONNECT payload existence

10 years ago3.4.4.2 SQUID_3_4_4_2
Amos Jeffries [Wed, 23 Apr 2014 14:01:34 +0000 (07:01 -0700)] 
3.4.4.2

10 years ago3.4.4.1 SQUID_3_4_4_1
Amos Jeffries [Wed, 23 Apr 2014 12:49:57 +0000 (05:49 -0700)] 
3.4.4.1

10 years agoBug 3371: CONNECT with data sent at once loses data
Amos Jeffries [Wed, 23 Apr 2014 10:40:36 +0000 (04:40 -0600)] 
Bug 3371: CONNECT with data sent at once loses data

10 years ago(no commit message)
Amos Jeffries [Wed, 23 Apr 2014 10:17:18 +0000 (03:17 -0700)] 

10 years agoFix outgoing peer type when using ORIGINAL_DST instead of DIRECT
Amos Jeffries [Wed, 23 Apr 2014 05:15:49 +0000 (22:15 -0700)] 
Fix outgoing peer type when using ORIGINAL_DST instead of DIRECT

10 years agoBug 4047: Support Android builds
Amos Jeffries [Wed, 23 Apr 2014 05:09:22 +0000 (22:09 -0700)] 
Bug 4047: Support Android builds

10 years agoBug 3986 (partial): assertion failed due to incorrect error page buffer size
Amos Jeffries [Wed, 23 Apr 2014 05:06:52 +0000 (22:06 -0700)] 
Bug 3986 (partial): assertion failed due to incorrect error page buffer size

errorpage.cc:1307:
   "(size_t)content->contentSize() == strlen(content->content())"

10 years agoBug 3955: Solaris EUI-48 lookup leaks FDs
Paul Z [Fri, 18 Apr 2014 18:45:17 +0000 (12:45 -0600)] 
Bug 3955: Solaris EUI-48 lookup leaks FDs

10 years agoBug 3982: EUI logging and helpers show blank MAC address
Amos Jeffries [Fri, 18 Apr 2014 18:44:12 +0000 (12:44 -0600)] 
Bug 3982: EUI logging and helpers show blank MAC address

Also,
 * improved debugging of EUI processing.
 * fixed code correctness in EUI class definitions

10 years agoFix IPv6 site-local autoconfigured Address detection
Amos Jeffries [Fri, 18 Apr 2014 18:43:35 +0000 (12:43 -0600)] 
Fix IPv6 site-local autoconfigured Address detection

10 years agoBug 4014: build failure with both --disable-optimizations --disable-auth
Amos Jeffries [Mon, 14 Apr 2014 14:01:29 +0000 (07:01 -0700)] 
Bug 4014: build failure with both --disable-optimizations --disable-auth

10 years agoMemBuf fix: empty MemBufs are not NULL terminated
Christos Tsantilas [Wed, 9 Apr 2014 16:56:54 +0000 (09:56 -0700)] 
MemBuf fix: empty MemBufs are not NULL terminated

This is may cause problems in some cases where the code assume that the MemBuf
is always NULL terminated. For example when an ErrorState object try to use
an empty errorpage template.

This patch terminates the (empty) MemBuf on MemBuf::init method.

10 years agoHTTP/1.1: update reference to IANA method registry
Amos Jeffries [Wed, 9 Apr 2014 16:54:22 +0000 (09:54 -0700)] 
HTTP/1.1: update reference to IANA method registry

10 years agoHTTP/1.1: Update registered status codes from IANA registry
Amos Jeffries [Wed, 9 Apr 2014 16:53:05 +0000 (09:53 -0700)] 
HTTP/1.1: Update registered status codes from IANA registry

IETF HTTPbis WG has created an IANA registry for HTTP status codes at
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

Update our registered codes and strings to match the registry entries.

10 years agoUpdates to qos_flows documentation
Andrew Beverley [Sun, 6 Apr 2014 04:41:59 +0000 (22:41 -0600)] 
Updates to qos_flows documentation

Minor updates to the qos_flows documentation based on recent squid-users
questions.

10 years agoC++11: Upgrade auto-detection to use the formal -std=c++11
Amos Jeffries [Sun, 6 Apr 2014 04:41:08 +0000 (22:41 -0600)] 
C++11: Upgrade auto-detection to use the formal -std=c++11

When the latest compilers added support for -std=c++11 they also dropped
the temporary -std=c++0x option without backward-compatible support. So
for the newest compilers we have not been testing the C++11 code.

As a result of this change Squid will no longer attempt to enable the
partial support in older compilers with -std=c++0x.

Also, update the compiler option test macro from autoconf project.

10 years agoBasic auth cache and SslBump fix
Christos Tsantilas [Sun, 6 Apr 2014 04:39:32 +0000 (22:39 -0600)] 
Basic auth cache and SslBump fix

This patch fixes the following bug:
 1) A user sends a CONNECT request with valid credentials
 2) Squid checks the credentials and adds the user to the user cache
 3) The same user sends a CONNECT request with invalid credentials
 4) Squid overwrites the entry in the user cache and denies the second
    CONNECT request
 5) The user sends a GET request on the first SSL connection which is
    established by now
 6) Squid knows that it does not need to check the credentials on the
    bumped connection but still somehow checks again whether the user is
    successfully authenticated
 7) Due to the second CONNECT request the user is regarded as not
    successfully authenticated
 8) Squid denies the GET request of the first SSL connection with 403
    ERR_CACHE_ACCESS_DENIED

On proxies with Basic authentication and SSL bumping, this can be used
to prevent a legitimate user from making any HTTPS requests

This is a Measurement Factory project

10 years agocrypto-ng: use libnettle MD5 algorithm support
Amos Jeffries [Sun, 6 Apr 2014 04:37:08 +0000 (22:37 -0600)] 
crypto-ng: use libnettle MD5 algorithm support

Transitional patch detects libnettle when available and uses it without
yet forcing it as a required dependency.

10 years agoBug 4043: Remove XMALLOC_TRACE and references to sbrk(2)
Francesco Chemolli [Sun, 23 Mar 2014 05:00:54 +0000 (23:00 -0600)] 
Bug 4043: Remove XMALLOC_TRACE and references to sbrk(2)

10 years agoPortability: detect struct iovec better on OpenBSD
Francesco Chemolli [Sun, 23 Mar 2014 04:57:40 +0000 (22:57 -0600)] 
Portability: detect struct iovec better on OpenBSD

10 years agoBug 4019: Regression in 3.4 r13079
Martin Stolle [Fri, 21 Mar 2014 08:48:48 +0000 (02:48 -0600)] 
Bug 4019: Regression in 3.4 r13079

10 years agoBug 4041: Missing files in compat/Makefile.am
Changming [Fri, 21 Mar 2014 08:47:02 +0000 (02:47 -0600)] 
Bug 4041: Missing files in compat/Makefile.am

10 years agoUse request URI instead of StoreID when forwarding requests to peers
Nikolai Gorchilov [Fri, 21 Mar 2014 08:45:23 +0000 (02:45 -0600)] 
Use request URI instead of StoreID when forwarding requests to peers

TODO: There are more bugs like that, including using Store IDs in ICP
requests.

10 years ago3.4.4 SQUID_3_4_4
Amos Jeffries [Sun, 9 Mar 2014 09:40:22 +0000 (03:40 -0600)] 
3.4.4

10 years agoPrep for 3.4.4 and 3.3.12
Amos Jeffries [Sun, 9 Mar 2014 03:57:02 +0000 (20:57 -0700)] 
Prep for 3.4.4 and 3.3.12

10 years agoAvoid assertions on Range requests that trigger Squid-generated errors.
Alex Rousskov [Sun, 9 Mar 2014 01:48:00 +0000 (18:48 -0700)] 
Avoid assertions on Range requests that trigger Squid-generated errors.

Added HttpRequest::ignoreRange() to encapsulate range ignoring logic.
Currently the new method only contains the code common among all callers. More
work is needed to check whether further caller homogenization is possible.

Documented that ClientSocketContext::getNextRangeOffset() may sometimes be
called before it is ready to do its job.

10 years agoProtect MemBlob::append() against raw-space writes
Amos Jeffries [Sun, 9 Mar 2014 01:47:23 +0000 (18:47 -0700)] 
Protect MemBlob::append() against raw-space writes

There is no guarantee that the 'unused' area of MemBlob is actually
unused. For example if a read buffer was being filled into the
rawSpace() of a SBuf or MemBlob it will overlap with this empty area
until a read call updates the related size state in MemBlob/SBuf.

For these cases we must use memmove() which guarantees no buffer
corruption will take place on memory overlaps.

10 years agoCopyright: Relicense helpers by Treehouse Networks Ltd.
Amos Jeffries [Sun, 9 Mar 2014 01:45:37 +0000 (18:45 -0700)] 
Copyright: Relicense helpers by Treehouse Networks Ltd.

Update the license on helper code designed and authored by myself using
the BSD 2-clause license. This makes the example helper code and license
more legally acceptible for use as a basis of proprietary helpers while
remaining compatible with GPL for distribution with Squid.

10 years agoPortability: define CMSG related structures individually
Amos Jeffries [Sun, 9 Mar 2014 01:44:07 +0000 (18:44 -0700)] 
Portability: define CMSG related structures individually

Some OS provide the CMSG related definitions and others only partially
define them. Sometimes (Windows particularly) this varies between build
environments.

Checking for each symbol separately and providing only those needed
avoids problems we have been having with missing or redefined symbols
on Windows and elsewhere.

10 years agoFix helper ID number assignment
Amos Jeffries [Wed, 5 Mar 2014 02:50:43 +0000 (19:50 -0700)] 
Fix helper ID number assignment

Since helpers are now dynamically started the old method of allocating
an ID number based on the current start sequence can result in many
helpers being assigned overlapping ID numbers.

Use InstanceID template instead to assure a unique incremental ID is
assigned to each helper no matter when it is started.

10 years agoFixed stalled concurrent rock store reads by insuring their ID uniqueness.
Alex Rousskov [Wed, 5 Mar 2014 02:49:29 +0000 (19:49 -0700)] 
Fixed stalled concurrent rock store reads by insuring their ID uniqueness.

Added a check to prevent similar bugs from occurring in the future.

10 years agoBug 3186, Bug 3628: Digest authentication always sending stale=false for nonce
Henrik Nordstrom [Wed, 5 Mar 2014 02:48:25 +0000 (19:48 -0700)] 
Bug 3186, Bug 3628: Digest authentication always sending stale=false for nonce

10 years agodynamic_cert_mem_cache_size option related fixes
Christos Tsantilas [Tue, 4 Mar 2014 10:14:42 +0000 (03:14 -0700)] 
dynamic_cert_mem_cache_size option related fixes

This patch fixes the following problems:

1) The dynamic_cert_mem_cache_size does not change on reconfigure

2) When dynamic_cert_mem_cache_size of http_port set to 0 then:

   a) The dynamic certs cache is grow unlimited.
      This patch just disables certificates caching when this option set to 0.

   b) Huge amount of memory appeared as free cache memory in  "Cached ssl
      certificates statistic" page of cache manager.
      This problem caused because of a signed to unsigned int conversion.

  This is a Measurement Factory project

10 years agoFix umask default on crash report generated email
Amos Jeffries [Tue, 4 Mar 2014 10:05:16 +0000 (03:05 -0700)] 
Fix umask default on crash report generated email

10 years agoFix pthread library detection on FreeBSD 10
Amos Jeffries [Tue, 18 Feb 2014 14:00:50 +0000 (07:00 -0700)] 
Fix pthread library detection on FreeBSD 10

We should not be using "cut -b1" anywhere to determine OS version
number. It drops digits out of the major version number.

10 years agoBug 4029: intercepted HTTPS requests bypass caching checks
Rajiv Desai [Tue, 18 Feb 2014 08:55:52 +0000 (01:55 -0700)] 
Bug 4029: intercepted HTTPS requests bypass caching checks

10 years agoBug 4026: SSL and adaptation_access does not handle aborted connections
Nathan Hoad [Tue, 18 Feb 2014 08:55:04 +0000 (01:55 -0700)] 
Bug 4026: SSL and adaptation_access does not handle aborted connections

10 years agoBug 4001: remove use of strsep()
Amos Jeffries [Tue, 18 Feb 2014 08:46:49 +0000 (01:46 -0700)] 
Bug 4001: remove use of strsep()

The strsep() function is not defined by POSIX. Additionally
auto-tools has been having some obscure issues detecting
or linking the provided implementation into libcompat on
Windows and Solaris respectively. Which are the two known
OS requiring it.

Investigation of its use in Squid revealed that it can be
replaced with strcspan() which is both portable and more
efficient since it also removes the need for several
strdup()/free() operations used to protect Squid from
strsep() memory fiddling.

10 years agoMove compat/unsafe.h protections from libcompat to source maintenance
Amos Jeffries [Tue, 18 Feb 2014 08:43:02 +0000 (01:43 -0700)] 
Move compat/unsafe.h protections from libcompat to source maintenance

It is sufficient to run a code scan from source-maintenance.sh for the
unsafe functions being used in Squid-specific code instead of
hard-coding compiler breakage on users.
This also "fixes" reporting of errors when cstdio pulls in use of the
unsafe functions by stdlib.

10 years agoBug 3969: user credentials cache lookup for Digest authentication broken
Frederic Bourgeois [Wed, 12 Feb 2014 09:31:39 +0000 (02:31 -0700)] 
Bug 3969: user credentials cache lookup for Digest authentication broken

Changes to the username credentials cache were made in Basic auth but
the matching changes were not duplicated to Digest auth. Since the
lookup is identical move it to generic Auth::Config.

Also fixes assertion auth_digest.cc:759:
    "(nonce->user == NULL) || (nonce->user == user)"

10 years agoVarious fixes to configure for FreeBSD 10
Dennis Glatting [Wed, 12 Feb 2014 08:54:42 +0000 (01:54 -0700)] 
Various fixes to configure for FreeBSD 10

* Detect cstdio file presence for libcompat, and restrict to C++

* Fix shell syntax in Heimdal Kerberos library detection

10 years agoRegression Bug 3769: client_netmask not evaluated since Comm redesign
Amos Jeffries [Wed, 12 Feb 2014 08:52:29 +0000 (01:52 -0700)] 
Regression Bug 3769: client_netmask not evaluated since Comm redesign

10 years agoUpdate CONTRIBUTORS SQUID_3_4_3
Amos Jeffries [Sun, 2 Feb 2014 08:25:25 +0000 (01:25 -0700)] 
Update CONTRIBUTORS

10 years ago3.4.3
Amos Jeffries [Sun, 2 Feb 2014 08:24:10 +0000 (01:24 -0700)] 
3.4.3

10 years agoFix peerSelectDnsResults() IP address cycling
Amos Jeffries [Sun, 2 Feb 2014 02:47:38 +0000 (19:47 -0700)] 
Fix peerSelectDnsResults() IP address cycling

The local ip variable is the index of the IP address to be used.
Loop counter n is only used to prevent cycling indefinitely and should
not be used to access the array indexes.

10 years agoComm job callbacks need job's cbdata pointer, not a job pointer.
Alex Rousskov [Sun, 2 Feb 2014 02:47:05 +0000 (19:47 -0700)] 
Comm job callbacks need job's cbdata pointer, not a job pointer.

Otherwise, in complex inheritance hierarchies, some [inner] classes will
hit cbdata cookie assertions when scheduling Comm calls with callbacks.

10 years agoBug 3975: atomic detection cross-compilation failure
Stefano Cordibella [Sun, 2 Feb 2014 02:46:03 +0000 (19:46 -0700)] 
Bug 3975: atomic detection cross-compilation failure

10 years agoBug 3954: compile failure in CpuAffinity.cc
Unknown FreeBSD Contributor [Sun, 2 Feb 2014 02:44:37 +0000 (19:44 -0700)] 
Bug 3954: compile failure in CpuAffinity.cc

Patch written by 'dim [1]' contributor to FreeBSD and imported to Squid
under FreeBSD license. see
http://svnweb.freebsd.org/ports/head/www/squid33/files/patch-include__Array.h

10 years agoBug 3971: "cannot aggregate mgr:client_list: cmd->profile != NULL" in SMP mode
Nathan Hoad [Sun, 2 Feb 2014 02:41:49 +0000 (19:41 -0700)] 
Bug 3971: "cannot aggregate mgr:client_list: cmd->profile != NULL" in SMP mode

When running Squid in SMP mode, the 'client_list' command cannot be used as the
coordinator doesn't call clientdbInit(), and thus doesn't have the client_list
action registered.

This patch uses RegisteredRunner to initialize clientdb and register the
'client_list' command

10 years agoInitialize asyncLoopDepth_ in constructor
Amos Jeffries [Sun, 2 Feb 2014 02:38:51 +0000 (19:38 -0700)] 
Initialize asyncLoopDepth_ in constructor

  Detected by Coverity Scan. Issue 740529.

10 years agoFix external_acl_type async loop failures
Amos Jeffries [Wed, 22 Jan 2014 03:29:15 +0000 (20:29 -0700)] 
Fix external_acl_type async loop failures

When external_acl_type uses %LOGIN and is required to trigger async
authentication lookups it returns and hits the async loop prevention
check when starting to trigger its own external helper lookup. This
results in a DUNNO output from the helper as final status instead of
the real helper lookup result.

Avoid these by allowing async helpers to loop several times before
aborting the lookups.

Also, extend debug message to indicate loop count.

Thanks to Peter Benko for tracking down the issue and testing solutions.

10 years agoBug 4008: HttpHeader warnOnError should be an int not a bool
Will Roberts [Wed, 22 Jan 2014 03:18:56 +0000 (20:18 -0700)] 
Bug 4008: HttpHeader warnOnError should be an int not a bool

10 years agoFix memory leak in peer cache Digest exchange
Amos Jeffries [Wed, 22 Jan 2014 03:17:25 +0000 (20:17 -0700)] 
Fix memory leak in peer cache Digest exchange

 Detected by Coverity Scan. Issue 1094115.

10 years agoBug 3927: tests/testRock fatal.cc required
Amos Jeffries [Mon, 13 Jan 2014 23:50:22 +0000 (16:50 -0700)] 
Bug 3927: tests/testRock fatal.cc required

10 years agoBug 4002: clang 3.4 unable to compile
Francesco Chemolli [Mon, 13 Jan 2014 11:40:52 +0000 (04:40 -0700)] 
Bug 4002: clang 3.4 unable to compile

part 3: Fix coding ambiguity in store_repl_heap.cc and heap.h

10 years agoDocument and enforce invariant on Format::Token.divisor
Francesco Chemolli [Sun, 12 Jan 2014 02:14:21 +0000 (19:14 -0700)] 
Document and enforce invariant on Format::Token.divisor

10 years agoBug 4002: clang 3.4 unable to compile
Francesco Chemolli [Sun, 12 Jan 2014 02:12:13 +0000 (19:12 -0700)] 
Bug 4002: clang 3.4 unable to compile

part 2: fix new/delete operator overloading by not defining on clang

10 years agoBug 4002: clang 3.4 unable to compile
Francesco Chemolli [Sun, 12 Jan 2014 02:11:06 +0000 (19:11 -0700)] 
Bug 4002: clang 3.4 unable to compile

part 1: fix header guards on include files.

10 years agoBug 3996: Malformed DNS reply leads to crash
Susant Sahani [Sun, 12 Jan 2014 02:09:32 +0000 (19:09 -0700)] 
Bug 3996: Malformed DNS reply leads to crash

10 years agoDisable error page translation by default in builds
Amos Jeffries [Sun, 12 Jan 2014 02:07:51 +0000 (19:07 -0700)] 
Disable error page translation by default in builds

There is no need for every build from VCS to have fresh translations.

Enable explicitly for snapshot and release scripts instead so that
translated template files are still available online and pre-translated
in the distributed packages.

10 years agoBug 3995: compile error on CentOS 5 with GCC 4.1.2
Reinhard Sojka [Sun, 12 Jan 2014 02:03:10 +0000 (19:03 -0700)] 
Bug 3995: compile error on CentOS 5 with GCC 4.1.2

10 years agoCentrally destroy all ACLs to avoid destruction segfaults
Alex Rousskov [Sun, 12 Jan 2014 01:49:08 +0000 (18:49 -0700)] 
Centrally destroy all ACLs to avoid destruction segfaults

 ... during reconfiguration.

Group ACLs created later may use other ACLs created earlier and vice
versa, a group ACL created earlier may use other ACLs created later.
The latter is possible when an ACL (e.g., A2 below) is declared when the
group already exists:

  acl A1 src 127.0.0.1
  acl Group all-of A1
  acl A2 src 127.0.0.2
  acl Group all-of A2

Thus, the group (i.e., InnerNode) ACL destructor may access already
deleted children regardless of the global ACL deletion order (FIFO or
LIFO with respect to ACL creation). Instead of relying on the deletion
order to protect InnerNode, we remove the InnerNode ACL destructor
completely and rely on a global set of registered ACLs to destroy all
ACLs.

The old code was destroying all explicit ACLs in the same centralized
fashion. We now add implicit ACLs (commonly used by InnerNodes) to the
centralized destruction sequence. We added a new destruction-dedicated
container to avoid messing with the by-name ACL search that
Config.aclList global is used for.
This new container will become unnecessary once we start refcounting
ACLs.

10 years ago3.4.2 SQUID_3_4_2
Amos Jeffries [Mon, 30 Dec 2013 11:06:13 +0000 (04:06 -0700)] 
3.4.2

10 years agoAdded missing header in client_side_reply.cc for clang
Francesco Chemolli [Mon, 30 Dec 2013 10:56:07 +0000 (03:56 -0700)] 
Added missing header in client_side_reply.cc for clang

10 years agoBug 3498: FTP PUT assertion Server.cc:246: 'r->body_pipe != NULL'
Alex Rousskov [Mon, 30 Dec 2013 04:02:38 +0000 (21:02 -0700)] 
Bug 3498: FTP PUT assertion Server.cc:246: 'r->body_pipe != NULL'

10 years agoBug 3985: 60s limit introduced by balance_on_multiple_ip breaks bad IP recovery
Jakob Bohm [Wed, 25 Dec 2013 21:36:07 +0000 (14:36 -0700)] 
Bug 3985: 60s limit introduced by balance_on_multiple_ip breaks bad IP recovery

Alternative fix if necessary would be to calculate a dynamic timeout
value based on number and timeouts for connections and forwarding.

However, as noted in the bug report the address markings are reset every
TTL when the stored RR are replaced. This meets the criteria for
periodic
retries of marked-BAD IPs. Also if all IPs are marked BAD they all get
un-marked and retried. So for now just remove the TTL hack.

10 years agoFix \-unescaping in quoted strings from helpers
Amos Jeffries [Wed, 25 Dec 2013 21:35:15 +0000 (14:35 -0700)] 
Fix \-unescaping in quoted strings from helpers

strwordtok() was unescaping '\' values in unquoted tokens. This causes
problems with NTLM helper response user\DOMAIN values which are sent as
a un-quoted un-escaped value.

Restrict un-escaping of '\' to only occur when inside "quoted" words.

10 years agoWCCPv2: fix assertion 'Cannot convert non-IPv4 to IPv4' on FreeBSD
Amos Jeffries [Wed, 25 Dec 2013 21:34:33 +0000 (14:34 -0700)] 
WCCPv2: fix assertion 'Cannot convert non-IPv4 to IPv4' on FreeBSD

FreeBSD does not set the from-address on recv() if there was an error
reading the packet. This can result in Ip::Address assertion if the
error is not checked for before the IP address is mapped into Squid
internal format.

10 years agoFix missing cast in rev.13162
Amos Jeffries [Wed, 25 Dec 2013 21:33:50 +0000 (14:33 -0700)] 
Fix missing cast in rev.13162

10 years agoBug 3980: FATAL ERROR due to max_user_ip -s option
Christos Tsantilas [Thu, 19 Dec 2013 09:04:49 +0000 (02:04 -0700)] 
Bug 3980: FATAL ERROR due to max_user_ip -s option

NP: unit test for -s option temporarily removed and replaced with manual
testing due to 3.4 series parser flags handlign being done at the ACL
module level instead of ACl test.

10 years agoFix linker errors "relocation R_X86_64_32 against .rodata"
Amos Jeffries [Thu, 19 Dec 2013 07:55:03 +0000 (00:55 -0700)] 
Fix linker errors "relocation R_X86_64_32 against .rodata"

... "can not be used when making a shared object; recompile with -fPIC"

Caused by some libraries built without libtool in certain environments.
NP: there are other libraries in Squid built without libtool but they
    appear not to be having these linker issues at this time.

Also, fixes "undefined symbol eui64_aton" uncovered by these changes.

10 years agoRegression in URL helper API
Amos Jeffries [Sun, 15 Dec 2013 05:33:33 +0000 (22:33 -0700)] 
Regression in URL helper API

The backward compatibility logics in redirect.cc are not working as
intended on redirection URLs due to the presence of '=' in the URL and
how the key=value name parsing is performed.

A typical redirection URL looks like:
  http://example.com/?url=http://www.example.net/

and 3.4 has a parser that splits tokens at '=' unconditionally and then
passes the bits as a key and value to the redirector logics which
complains that it does not understand the answer of the URL redirector.
Or treats is an an unknown key=value with no redirection URL.

Either case is handled as a no-redirection result from the helper.

This limits the key names to alphanumeric, hyphen and underscore
characters. Valid URL responses contain characters outside this set and
should no longer be interpreted as keys regardless of the '=' character.

10 years agoBug 3806: Caching responses with Vary header
Alex Rousskov [Sun, 15 Dec 2013 05:18:46 +0000 (22:18 -0700)] 
Bug 3806: Caching responses with Vary header

10 years agoSet sslcrtvalidator_children concurrency option default value to 1
Christos Tsantilas [Sun, 15 Dec 2013 05:06:25 +0000 (22:06 -0700)] 
Set sslcrtvalidator_children concurrency option default value to 1

10 years agoRelease notes: update HTML version
Amos Jeffries [Mon, 9 Dec 2013 03:03:16 +0000 (20:03 -0700)] 
Release notes: update HTML version

10 years ago3.4.1 SQUID_3_4_1
Amos Jeffries [Mon, 9 Dec 2013 01:20:11 +0000 (18:20 -0700)] 
3.4.1

10 years agoBug 3589: intercepted and ICAP modified request using a cache_peer
Amos Jeffries [Mon, 9 Dec 2013 01:04:23 +0000 (18:04 -0700)] 
Bug 3589: intercepted and ICAP modified request using a cache_peer

10 years agoOpenBSD portability fix in DiskThreads
Francesco Chemolli [Mon, 9 Dec 2013 01:02:29 +0000 (18:02 -0700)] 
OpenBSD portability fix in DiskThreads

10 years agoBug 3935: Invalid pointer dereference when peeking at origin server certificate
Christos Tsantilas [Fri, 6 Dec 2013 12:19:41 +0000 (05:19 -0700)] 
Bug 3935: Invalid pointer dereference when peeking at origin server certificate

We must check request->clientConnectionManager pointer for validity before
dereferencing it.

This is a Measurement Factory project

10 years agoDestroy ACLs in the reverse order of creation to avoid destruction segfaults
Alex Rousskov [Fri, 6 Dec 2013 12:18:19 +0000 (05:18 -0700)] 
Destroy ACLs in the reverse order of creation to avoid destruction segfaults
during reconfiguration.

Group ACLs created later may use other ACLs created earlier. A group ACL must
be deleted first so that its AclDeleter can safely access registration status
(and avoid double deletion) of the ACLs it uses. Since ACLs are remembered (in
Config.aclList) using a singly-linked list, it is difficult to change their
deletion order.  Instead, we change their listing order from FIFO to LIFO.

10 years agoPortability: sleep() is sometimes a macro
Amos Jeffries [Fri, 6 Dec 2013 12:16:22 +0000 (05:16 -0700)] 
Portability: sleep() is sometimes a macro

sleep() is sometimes defined as a macro. Such as in Squid compat library.
Use another name for the sleep starting method in class Ipc::UdsOp

  This is an iCelero Project

10 years agoWindows: fix compile errors in WinSvc.cc
Amos Jeffries [Fri, 6 Dec 2013 12:15:54 +0000 (05:15 -0700)] 
Windows: fix compile errors in WinSvc.cc

Fix defined by unused symbol errors in WinSvc.cc

Also, set the service error mode to prevent Windows Error Reporting
dialog boxes appearing.

  This is an iCelero Project

10 years agoPortability: std::string:npos is not always appropriate for String::npos
Amos Jeffries [Fri, 6 Dec 2013 12:15:11 +0000 (05:15 -0700)] 
Portability: std::string:npos is not always appropriate for String::npos

On some systems such as Windows MinGW the signed/unsigned property of
std::string::npos does not match up with the Squdi String class size_type
signed/unsigned property. Resulting in compiler signed vs unsigned
mismatch errors when compiling.

  This is an iCelero project.

10 years agoPortability: refresh_pattern requires regex
Amos Jeffries [Fri, 6 Dec 2013 12:14:34 +0000 (05:14 -0700)] 
Portability: refresh_pattern requires regex

The GnuRegex portability wrapper is required explicitly by
RefreshPattern.h on some systems which do not include regex.h implicitly
via other paths.

  This is an iCelero project

10 years agolibrfcnb: portability fixes
Amos Jeffries [Fri, 6 Dec 2013 12:13:36 +0000 (05:13 -0700)] 
librfcnb: portability fixes

Add #include wrapper protection for headers missing on Windows MinGW.

  This is an iCelero Project

10 years ago3.4.0.3 SQUID_3_4_0_3
Amos Jeffries [Sat, 30 Nov 2013 13:19:32 +0000 (06:19 -0700)] 
3.4.0.3

10 years agoPrep for 3.3.11 and 3.4.0.3
Amos Jeffries [Sat, 30 Nov 2013 13:18:50 +0000 (06:18 -0700)] 
Prep for 3.3.11 and 3.4.0.3

10 years agoProtect aclIsProxyAuth() debugging from NULL names (via NULL AclMatchedName).
Nathan Hoad [Sat, 30 Nov 2013 09:18:21 +0000 (02:18 -0700)] 
Protect aclIsProxyAuth() debugging from NULL names (via NULL AclMatchedName).

Related to Bug 3972 fix in r13156.

10 years agoBug 3972: Segfault when getting the deny info page ID after a reconfigure
Nathan Hoad [Sat, 30 Nov 2013 09:16:25 +0000 (02:16 -0700)] 
Bug 3972: Segfault when getting the deny info page ID after a reconfigure

Older ACL code was using a stale AclMatchedName value. More recent code resets
the AclMatchedName global to NULL to avoid leaking the stale value, but that
may crash strcmp() in aclGetDenyInfoPage(). Long-term, the global should be
removed, of course.

10 years agoReceive annotations from authentication and external ACL helpers
Amos Jeffries [Fri, 29 Nov 2013 10:55:53 +0000 (03:55 -0700)] 
Receive annotations from authentication and external ACL helpers

This saves the kv-pair from authentication and ACL helper responses as
annotations on the HttpRequest and pass on from there to logging.

Added a method appendNewOnly() to ensure duplicate-free addition
to a NotePairs list.

Also, fixes a bug in hasPair() accessor which was returning true
if either the key OR the value matched.
ie. hasPair("a","1") would match true for notes "a=2 b=1"

10 years agoBug 3782: Digest authentication not obeying nonce_max_count
Frederic Bourgeois [Fri, 29 Nov 2013 04:24:51 +0000 (21:24 -0700)] 
Bug 3782: Digest authentication not obeying nonce_max_count

10 years agoBug 3970: max_filedescriptors disabled due to missing setrlimit
Amos Jeffries [Fri, 29 Nov 2013 04:22:04 +0000 (21:22 -0700)] 
Bug 3970: max_filedescriptors disabled due to missing setrlimit

10 years agoBug 3967: ipc/Kid.cc compilation failure: 'time' was not declared in this scope
Thomas De Schampheleire [Fri, 29 Nov 2013 04:15:06 +0000 (21:15 -0700)] 
Bug 3967: ipc/Kid.cc compilation failure: 'time' was not declared in this scope

Function time() comes from <time.h>, so add the necessary #include.

10 years agoAdd missing part of rev.13033 backport
Amos Jeffries [Wed, 20 Nov 2013 00:13:59 +0000 (17:13 -0700)] 
Add missing part of rev.13033 backport

10 years agoRe-compute Range response content offset after an FTP response was adapted.
Alex Rousskov [Tue, 19 Nov 2013 22:51:46 +0000 (15:51 -0700)] 
Re-compute Range response content offset after an FTP response was adapted.

Moved HTTP-only offset calculation code to the general ServerStateData code so
that [converted-to-HTTP] FTP responses can use it. FTP code computes the range
offset on its own earlier, but we must REcalculate in case the response is
adapted into a response with a different (or no) content range.