]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoBug 3568: Consolidate external_acl_form config dumping a bit and add missing percent...
Robert Collins [Fri, 27 Jul 2012 04:31:36 +0000 (22:31 -0600)] 
Bug 3568: Consolidate external_acl_form config dumping a bit and add missing percent dumper.

13 years agoBug 3593: socket failure: Address family not supported by protocol
Amos Jeffries [Fri, 27 Jul 2012 04:28:30 +0000 (22:28 -0600)] 
Bug 3593: socket failure: Address family not supported by protocol

13 years agoAdded missing cbdata debugging so that find-alive.pl can find cbdata leaks.
Alex Rousskov [Fri, 27 Jul 2012 04:08:16 +0000 (22:08 -0600)] 
Added missing cbdata debugging so that find-alive.pl can find cbdata leaks.

13 years agoConvert AccessLogEntry class to RefCountable
Christos Tsantilas [Fri, 27 Jul 2012 04:06:32 +0000 (22:06 -0600)] 
Convert AccessLogEntry class to RefCountable

The AccessLogEntry objects currently are only members of the ClientHttpRequest
objects. There are cases where we need to access AccessLogEntry from server
side objects to retrieve already stored informations for the client request and use it in
server side code with format/* interface (eg use Format::Format::assemble
inside http.cc)

This patch convert AccessLogEntry class to RefCountable to allow link it with
other than the ClientHttpRequest objects.

This is a Measurement Factory project.

13 years agoCleanup: Remove unnecessary todo marker in stub_debug.cc
Francesco Chemolli [Fri, 27 Jul 2012 03:57:58 +0000 (21:57 -0600)] 
Cleanup: Remove unnecessary todo marker in stub_debug.cc

13 years agoAdd helper macro for parser deprecation notes
Amos Jeffries [Fri, 27 Jul 2012 03:53:06 +0000 (21:53 -0600)] 
Add helper macro for parser deprecation notes

When '-k parse' is used deprecation notices and upgrade help messages etc
need to be bumped consistently up to level-0 and this macro will help
reducing the (?:) code mistakes.

13 years agoAdded a todo to avoid a pointless validation loop when validation (-S) is not requested.
Alex Rousskov [Sat, 21 Jul 2012 01:29:37 +0000 (19:29 -0600)] 
Added a todo to avoid a pointless validation loop when validation (-S) is not requested.

13 years agoAvoid bogus "Disk space over limit" warnings when rebuidling dirty ufs index.
Alex Rousskov [Sat, 21 Jul 2012 01:28:42 +0000 (19:28 -0600)] 
Avoid bogus "Disk space over limit" warnings when rebuidling dirty ufs index.

Subtract sizes of added-then-rejected entries while loading ufs cache index.

Before SMP changes, the ufs code was incorrectly ignoring the size of
loaded-but-not-yet-validated entries, leading to cache disk overflows.
After SMP changes, the ufs code was not subtracting sizes of
loaded-but-then-rejected entries, leading to bogus "Disk space over
limit" warnings. Now we correctly account for both kinds of entries.

13 years agoSilence IOS 15.1 unknown capabilities messages.
Amos Jeffries [Sat, 21 Jul 2012 01:27:05 +0000 (19:27 -0600)] 
Silence IOS 15.1 unknown capabilities messages.

Its nice to know when new capabilities are added.
But we don't need to report after being informed about them.

TODO: reduce the message to once every thousand or so.
  But be careful to identify what different type numbers exist.

13 years agoBug 3478: Partial fix: Connection-auth on intercepted connections is broken
Christos Tsantilas [Sat, 21 Jul 2012 01:26:27 +0000 (19:26 -0600)] 
Bug 3478: Partial fix: Connection-auth on intercepted connections is broken

Currenty in the case of intercepted connections each request is open a new
connection to the destination server, even if the connection is a valid pinned
connection.
This patch fixes this problem and reuses pinned connections on intercepted
requests.

This is a Measurement Factory project

13 years agoBug 3551: store_rebuild.cc:116: "store_errors == 0" assertion
Alex Rousskov [Sat, 21 Jul 2012 01:16:32 +0000 (19:16 -0600)] 
Bug 3551: store_rebuild.cc:116: "store_errors == 0" assertion

Fail with an explanation instead of asserting. The assertion fails when a ufs
cache_dir's swap.state has inconsistencies AND the user starts Squid with a -S
command line option. Normally, such inconsistencies are ignored and many of
them are benign.  For example, a missing cache file with an ADD record in
swap.state is such an inconsistency.

The -S option was meant to help developers troubleshoot inconsistencies by
analyzing core dumps, but (a) admins treat assertions as Squid bugs and file
bug reports and (b) in most cases, it is really difficult to find the
inconsistency when Squid asserts after detecting all of them (and leaving the
detection context).

We now explicitly tell the admin what their options are and quit instead of
asserting.

TODO: Consider adding a ufs cache_dir option that checks for and removes
inconsistencies instead of not checking at all (default) or checking and
quitting (-S). This is difficult because some valid cache entries may look
inconsistent while they are being updated and some invalid cache entries
are not visible to Squid without a full directory scan.

13 years agoBug 3525: Do not resend nibbled PUTs and avoid "mustAutoConsume" assertion.
Alex Rousskov [Sat, 21 Jul 2012 01:14:53 +0000 (19:14 -0600)] 
Bug 3525: Do not resend nibbled PUTs and avoid "mustAutoConsume" assertion.

The connected_okay flag was not set when we were reusing the connection.
The unset flag overwrote bodyNibbled() check, allowing FwdState to retry
a PUT after the failed transaction consumed some of the request body
buffer, triggering BodyPipe.cc:239: "mustAutoConsume" assertion.

We now set the connected_okay flag as soon as we get a usable connection
and do not allow it to overwrite the bodyNibbled() check (just in case).

13 years agoBug 3556 Workaround: epoll assertion failed: comm.cc:1093: isOpen(fd)
Amos Jeffries [Sat, 21 Jul 2012 01:09:39 +0000 (19:09 -0600)] 
Bug 3556 Workaround: epoll assertion failed: comm.cc:1093: isOpen(fd)

13 years agoRestore memory caching ability lost since r11969.
Dmitry Kurochkin [Tue, 17 Jul 2012 11:41:40 +0000 (05:41 -0600)] 
Restore memory caching ability lost since r11969.
Honor maximum_object_size_in_memory for non-shared memory cache.

Since r11969, Squid calls trimMemory() for all entries to release unused
MemObjects memory. Unfortunately, that revision also started trimming objects
that could have been stored in memory cache later. Trimmed objects are no
longer eligible for memory caching.

It is possible that IN_MEMORY check in StoreEntry::trimMemory() was preventing
excessive trimming in the past, but after SMP changes, IN_MEMORY flag is set
only after the object is committed to a memory cache in
StoreController::handleIdleEntry(), so we cannot rely on it. For example:

  clientReplyContext::removeStoreReference()

    storeUnregister()
      StoreEntry::swapOut()
        StoreEntry::trimMemory()
          StoreEntry::releaseRequest()

    StoreEntry::unlock()
      StoreController::handleIdleEntry() // never get here because entry is
        set IN_MEMORY status             // already marked for release

This change adds StoreController::keepForLocalMemoryCache() and
MemStore::keepInLocalMemory() methods to check if an entry could be stored in
a memory cache (and, hence, should not be trimmed). The store-related part of
the trimming logic has been moved from StoreEntry::trimMemory() to
StoreController::maybeTrimMemory(). StoreEntry code now focuses on checks that
are not specific to any memory cache settings or admission policies.

These changes may resulted in Squid honoring maximum_object_size_in_memory for
non-shared memory cache. We may have been ignoring that option for non-shared
memory caches since SMP changes because the check for it was specific to a
shared memory cache.

13 years agoPolish: improve debug about which helper FD are failing
Amos Jeffries [Tue, 17 Jul 2012 11:40:17 +0000 (05:40 -0600)] 
Polish: improve debug about which helper FD are failing

13 years agoBug 3577: File Descriptors not properly closed in trunk r12185.
Amos Jeffries [Mon, 16 Jul 2012 06:28:20 +0000 (00:28 -0600)] 
Bug 3577: File Descriptors not properly closed in trunk r12185.
Bug 3583: Server connection stuck after TCP_REFRESH_UNMODIFIED.

These changes fix FD leaks and stuck connections under two conditions:

1) Client aborts while Squid's server-side establishes a connection

Bug 3577: When a client quits while ConnOpener is trying to open the
connection to the next hop, FwdState cancels its ConnOpener callback.
ConnOpener notices that when trying to connect again and quits before
establishing a connection. The ConnOpener cleanup code did not close the
temporary FD used for establishing the connection. It did call fd_close(),
but fd_close() does not close the FD, naturally.

ConnOpener was probably leaking the temporary FD in other error handling
cases as well. It was never closed unless the connection was successful.

2) Client aborts after Squid's server-side established a connection:

Bug 3583: When a client aborts the store entry after receiving an HTTP 304 Not
Modified reply in response to a cache refreshing IMS request, HttpStateData
notices an aborted Store entry (after writing the reply to store), but does
virtually nothing, often resulting in a stuck server connection, leaking a
descriptor.  Now we abort the server-side transaction in this case.

Bug 3577: Similarly, when a client disconnects after Squid started talking to
the origin server but before Squid received a [complete] server response,
HttpStateData notices an aborted Store entry (during the next read from the
origin server), but does virtually nothing, often resulting in a stuck server
connection, leaking a descriptor. Now we abort the server-side transaction in
this case.

FwdState now also closes the server-side connection, if any, when the client
aborts the store entry and FwdState::abort() callback is called. This helps
reduce the number of concurrent server-side connections when clients abort
connections rapidly as Squid no longer has to wait for the server-side I/O to
notice that the entry is gone. The code to close the connection was temporary
removed in trunk r10057.1.51.

13 years agoLog original async call cancellation reason, not just the repeated ones.
Alex Rousskov [Mon, 16 Jul 2012 06:22:22 +0000 (00:22 -0600)] 
Log original async call cancellation reason, not just the repeated ones.

13 years agoBug 3584: Detection of setresuid() is broken
Ole Christensen [Mon, 16 Jul 2012 06:21:08 +0000 (00:21 -0600)] 
Bug 3584: Detection of setresuid() is broken

13 years agocache.log analysis: Add a pattern to report alive (opened and not closed) FDs.
Alex Rousskov [Fri, 13 Jul 2012 11:54:51 +0000 (05:54 -0600)] 
cache.log analysis: Add a pattern to report alive (opened and not closed) FDs.

13 years ago[request|reply]_header_* manglers fixes to handle custom headers
Alex Rousskov [Fri, 13 Jul 2012 11:53:18 +0000 (05:53 -0600)] 
[request|reply]_header_* manglers fixes to handle custom headers

This patch fix the [request|reply]_header_[access|replace] configuration
parameters to support custom headers. Before this patch the user was able
to remove/replace/allow all custom headers using the "Other" as header name.

This is a Measurement Factory project.

13 years ago3.2.0.18 version tag SQUID_3_2_0_18
Amos Jeffries [Fri, 29 Jun 2012 01:37:34 +0000 (19:37 -0600)] 
3.2.0.18 version tag

13 years ago3.2.0.18
Amos Jeffries [Fri, 29 Jun 2012 01:34:08 +0000 (19:34 -0600)] 
3.2.0.18

13 years agoFix 'expected initializer before STUB_RETVAL'
Amos Jeffries [Thu, 28 Jun 2012 09:35:50 +0000 (03:35 -0600)] 
Fix 'expected initializer before STUB_RETVAL'

13 years agoLanguage Updates: fr, hy, pt_BR
Various Translators [Thu, 28 Jun 2012 08:16:48 +0000 (02:16 -0600)] 
Language Updates: fr, hy, pt_BR

13 years agoDo not double-escape %R on deny_info redirects
Amos Jeffries [Thu, 28 Jun 2012 05:15:44 +0000 (23:15 -0600)] 
Do not double-escape %R on deny_info redirects

13 years agoBug 3576: ICY streams being Transfer-Encoding:chunked
Amos Jeffries [Thu, 28 Jun 2012 05:15:20 +0000 (23:15 -0600)] 
Bug 3576: ICY streams being Transfer-Encoding:chunked

13 years agoFix build with GCC 4.7 (and probably other C++11 compilers).
Dmitry Kurochkin [Thu, 28 Jun 2012 05:14:18 +0000 (23:14 -0600)] 
Fix build with GCC 4.7 (and probably other C++11 compilers).

User-defined literals introduced by C++11 break some previously valid
code, resulting in errors when building with GCC v4.7. For example:

  error: unable to find string literal operator 'operator"" PRIu64'

In particular, whitespace is now needed after a string literal and
before something that could be a valid user-defined literal.  See
"User-defined literals and whitespace" section at [1] for more details.

The patch adds spaces between string literals and macros.

[1] http://gcc.gnu.org/gcc-4.7/porting_to.html

13 years agoDo not report the same job multiple times.
Alex Rousskov [Thu, 28 Jun 2012 05:13:09 +0000 (23:13 -0600)] 
Do not report the same job multiple times.

13 years agoCleanup: disconnect Authentication and URL-rewrite callback handlers
Amos Jeffries [Thu, 28 Jun 2012 05:12:14 +0000 (23:12 -0600)] 
Cleanup: disconnect Authentication and URL-rewrite callback handlers

The authentication handlers were for some reason using RH (rewrite helper)
callback typedef. But specifying it as a fatal error if the char*
parameter was used in auth.

Assign a new callback typedef AUTHCB for use by authentication callers.

This allows auth callers to use different parameters (none) and to avoid
possibly fatal mistakes when coding new auth modules.

13 years agoAccount for Store disk client quota when bandwidth-limiting the server.
Alex Rousskov [Thu, 28 Jun 2012 05:11:18 +0000 (23:11 -0600)] 
Account for Store disk client quota when bandwidth-limiting the server.

It is not clear why the store client type matters when
MemObject::mostBytesAllowed() is trying to find the maximum delay pool
quota for reading from the next hop HTTP server.  Whether the client(s)
are reading from disk or RAM, the corresponding server-side bandwidth
ought to be limited.

This code was removed as a part of bug 3462 investigation, but it is not
needed to fix bug 3462.

13 years agoBug 3462: Delay Pools and ICAP
Julien Pinon [Thu, 21 Jun 2012 00:39:01 +0000 (18:39 -0600)] 
Bug 3462: Delay Pools and ICAP

Allow StoreEntry::bytesWanted() API to ignore delay pools. Use that
feature when shoveling adapted response body from ICAP/eCAP BodyPipe
into Store.

If we do not ignore delay pools in
ServerStateData::handleMoreAdaptedBodyAvailable() context, and our pool
quota is exhausted, we will stop reading from the adaptation BodyPipe,
but there is no code/API to notify a BodyPipe reader when the quota
becomes available again.  With no reads from the pipe, the ICAP service
stops sending more adapted body data and possibly stops reading the
virgin body data from Squid, resulting in a stuck ICAP RESPMOD and the
master HTTP transaction.

We do need to call StoreEntry::bytesWanted() in this context because
otherwise Squid may run out of RAM (Squid bug #2619). The fix for that
problem inadvertently created this bug when delay pools were enabled.

Long-term, a "kick BodyPipe consumer when there is quota" code should be
added, and delay pools should be enabled for ICAP responses, but with
enough knobs for admins to disable ICAP pooling where needed. Most ICAP
environments will probably want to disable bandwidth controls because
ICAP service traffic is usually "local".

Removed StoreEntry::bytesWanted() TRY_FWD_HDR_WAIT guard that disabled
delay pool application until the final HTTP response headers are
received (HttpStateData::haveParsedReplyHeaders() is called). Nobody
could fully explain why that condition was really needed (and we
obviously want to limit bandwidth consumption at all response processing
stages, in general). The now-removed guard was bypassing delay pool
checks for virgin HTTP response (until the ICAP server responded with
adapted headers), causing bandwidth overuse.

Possibly fixes or helps with Squid bug #2606 as well.

13 years agoBug 2976: squid reports ERR_INVALID_URL for transparently captured requests when...
Christos Tsantilas [Thu, 21 Jun 2012 00:35:06 +0000 (18:35 -0600)] 
Bug 2976: squid reports ERR_INVALID_URL for transparently captured requests when reconfiguring

During reconfigure the configured AnyP::PortCfg objects in http_port_list
may deleted so it is not safe to use them while processing Http requests.
For this reason inside prepareTransparentURL (file client_side.cc) function
the protocol was hard-coded to "http" instead of read it from the related
AnyP::PortCfg object.
But this is breaks the intercepted https traffic.

This patch:
  1. Inside prepareTransparentURL read the protocol from the related
     AnyP::PortCfg object
  2. add_http_port() locks the new port pointer before linking it.
  3. parsePortCfg() locks the new port pointer before linking it.
  4. free_PortCfg() unlock the old port pointer before unlinking
     it. It does not delete the old pointer.

This patch also discussed in squid-dev user mailing list in
 "Re: [PATCH] Squid host rewrite for intercepted https requests"
thread.

This is a Measurement Factory project

13 years agoFix testHttpParser compile error 'variable tracking size limit exceeded'
Amos Jeffries [Tue, 19 Jun 2012 05:18:04 +0000 (23:18 -0600)] 
Fix testHttpParser compile error 'variable tracking size limit exceeded'

This can occur due to long lists of unit tests needing a lot of local
variable state tracking. Essentially 'function too long' after CPPUNIT
macros have been expanded.

Break the large set of request-line unit tests into groups related to
sub-parts of the request-line.

13 years agoPerformance: ACLFilledChecklist fills istelf from HttpRequest
Amos Jeffries [Tue, 19 Jun 2012 05:17:22 +0000 (23:17 -0600)] 
Performance: ACLFilledChecklist fills istelf from HttpRequest

13 years agoBug 3564: eCAP not supporting CoAP URI schemes
Amos Jeffries [Tue, 19 Jun 2012 05:15:36 +0000 (23:15 -0600)] 
Bug 3564: eCAP not supporting CoAP URI schemes

13 years agoFixed typo in r12165 (Bug 2138: NTLM passthrough using accel peer and ssl)
Alex Rousskov [Tue, 19 Jun 2012 02:28:12 +0000 (20:28 -0600)] 
Fixed typo in r12165 (Bug 2138: NTLM passthrough using accel peer and ssl)

13 years agossl_crtd compile issues with libsslutil
Alexander Komyagin [Tue, 19 Jun 2012 02:26:16 +0000 (20:26 -0600)] 
ssl_crtd compile issues with libsslutil

13 years agoBug 3526: permit high-speed nonce regeneration
Frederic Bourgeois [Tue, 19 Jun 2012 02:24:57 +0000 (20:24 -0600)] 
Bug 3526: permit high-speed nonce regeneration

13 years agoBug 2138: NTLM passthrough using accel cache_peer and ssl
Juan [Tue, 19 Jun 2012 02:23:37 +0000 (20:23 -0600)] 
Bug 2138: NTLM passthrough using accel cache_peer and ssl

13 years agoDrop dead include from xusleep.c
Amos Jeffries [Tue, 19 Jun 2012 01:45:51 +0000 (19:45 -0600)] 
Drop dead include from xusleep.c

13 years agoCleanup: remove xcountws() function
Amos Jeffries [Tue, 19 Jun 2012 01:41:22 +0000 (19:41 -0600)] 
Cleanup: remove xcountws() function

Reduces dependencies and removes one more unnecessary symbol

13 years agoRFC 6585 extends HTTP
Amos Jeffries [Tue, 19 Jun 2012 01:39:44 +0000 (19:39 -0600)] 
RFC 6585 extends HTTP

13 years agoBug 3405: ssl_crtd crashes failing to remove certificate
Alex Rousskov [Sat, 16 Jun 2012 02:19:41 +0000 (20:19 -0600)] 
Bug 3405: ssl_crtd crashes failing to remove certificate

13 years agoBug 3561: cbdata cookie assertion after bug 3505 fix.
Alex Rousskov [Wed, 13 Jun 2012 04:41:19 +0000 (22:41 -0600)] 
Bug 3561: cbdata cookie assertion after bug 3505 fix.

13 years agoPrep for 3.1.20
Amos Jeffries [Fri, 8 Jun 2012 11:01:05 +0000 (05:01 -0600)] 
Prep for 3.1.20

13 years agoRevert auto-maintenance mistake revno11566
Amos Jeffries [Fri, 8 Jun 2012 10:01:28 +0000 (04:01 -0600)] 
Revert auto-maintenance mistake revno11566

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 5 Jun 2012 11:27:52 +0000 (05:27 -0600)] 
SourceFormat Enforcement

13 years agoSourceLayout: convert hash.c to hash.cc
Amos Jeffries [Mon, 4 Jun 2012 11:13:50 +0000 (05:13 -0600)] 
SourceLayout: convert hash.c to hash.cc

Fix compiler identified C'isms. No other changes.

13 years agoBug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889
Christos Tsantilas [Mon, 4 Jun 2012 11:10:49 +0000 (05:10 -0600)] 
Bug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889

13 years agoBug 3233: Invalid URL accepted with url host is white spaces
Amos Jeffries [Mon, 4 Jun 2012 11:06:45 +0000 (05:06 -0600)] 
Bug 3233: Invalid URL accepted with url host is white spaces

13 years agoBug 3074: Improper URL handling with empty path (RFC 3986)
Fyodor [Mon, 4 Jun 2012 11:04:55 +0000 (05:04 -0600)] 
Bug 3074: Improper URL handling with empty path (RFC 3986)

13 years agoBug 3463: dnsserver fails to compile
Christos Tsantilas [Mon, 4 Jun 2012 11:03:27 +0000 (05:03 -0600)] 
Bug 3463: dnsserver fails to compile

13 years agoBug 3390: Proxy auth data visible to scripts
Francesco Chemolli [Mon, 4 Jun 2012 11:01:11 +0000 (05:01 -0600)] 
Bug 3390: Proxy auth data visible to scripts

13 years agoBug 3537: polish StatHist copy to avoid memory errors
Timo Teras [Mon, 4 Jun 2012 10:56:52 +0000 (04:56 -0600)] 
Bug 3537: polish StatHist copy to avoid memory errors

13 years agoPass external_acl_type credentials to ICAP
Dan Searle [Mon, 4 Jun 2012 10:54:52 +0000 (04:54 -0600)] 
Pass external_acl_type credentials to ICAP

Pass user credentials obtained from external ACLs to the ICAP service
using Proxy-Authorization and X-Client-Username ICAP headers.

13 years agoBug #3380: Mac OSX compile errors with CMSG_SPACE
Dmitry Kurochkin [Mon, 4 Jun 2012 10:52:56 +0000 (04:52 -0600)] 
Bug #3380: Mac OSX compile errors with CMSG_SPACE

13 years agoExtend g++ compatibility for extern inline functions
Francesco Chemolli [Mon, 4 Jun 2012 10:51:31 +0000 (04:51 -0600)] 
Extend g++ compatibility for extern inline functions

13 years agoDefine PRIuSIZE for displaying size_t
Amos Jeffries [Mon, 4 Jun 2012 10:50:34 +0000 (04:50 -0600)] 
Define PRIuSIZE for displaying size_t

This allows us to avoid casting size_t to long long for printf.

./configure script auto-detects the supposedly standard %zu macro in case
it is missing and compat/types.h defines some alternatives for systems
which do not define it.

13 years agoWindows: Disable WCCP, WCCPv2, DiskDaemon by default on MinGW
Francesco Chemolli [Mon, 4 Jun 2012 10:49:47 +0000 (04:49 -0600)] 
Windows: Disable WCCP, WCCPv2, DiskDaemon by default on MinGW

13 years agoWindows: Support DiskIO AIO on Win32
Francesco Chemolli [Mon, 4 Jun 2012 10:49:01 +0000 (04:49 -0600)] 
Windows: Support DiskIO AIO on Win32

13 years agoWindows: Implemented working check for libiphlpapi
Francesco Chemolli [Mon, 4 Jun 2012 10:39:46 +0000 (04:39 -0600)] 
Windows: Implemented working check for libiphlpapi

13 years agoBug 2885: AIX: check and set required compiler flags
Karl Benoit [Mon, 4 Jun 2012 10:27:26 +0000 (04:27 -0600)] 
Bug 2885: AIX: check and set required compiler flags

13 years agoAdd support for TLSv1.1 and TLSv1.2 options and methods
Amos Jeffries [Mon, 4 Jun 2012 10:25:03 +0000 (04:25 -0600)] 
Add support for TLSv1.1 and TLSv1.2 options and methods

When OpenSSL v1.0.1+ is being built against.

Also update the documentation for sslproxy_version which was not
mentioning what the supported version codes were.

Future work:
* make version config option(s) accept a set of named versions and
  convert to codes internally.
* redesign how version and options are handled. Admin should be able to
  just list the TLSv* wanted and Squid figure out the appropriate options
  from there.

13 years agoSourceLayout: port config and select-loop priority polishing
Amos Jeffries [Mon, 4 Jun 2012 10:23:57 +0000 (04:23 -0600)] 
SourceLayout: port config and select-loop priority polishing

- renames http_port_list to AnyP::PortCfg
- de-duplicate https_port_list into AnyP::PortCfg
- shuffles related globals and defines into anyp/PortCfg.*
- renames MAXHTTPPORTS to MAXTCPLISTENPORTS to suit its actual coverage of HTTP and HTTPS ports.
- shuffled config port clone function into a method.
- rename ICP/HTCP/SNMP API functions to consistent *OpenPorts() and *ClosePorts()

  NP:following applies to incoming_* and *_poll_cnt directives.
- renames *_icp_* to *_udp_*
- renames *_http_* to *_tcp_*
- shuffles duplicated struct SquidConf options into a shared structure
- shuffles related defines into comm/Loops.h
- documents options better

- various other cosmetic syntax tweaks and polish

One bug fix:
  comm_dns_incoming was not being propigated in StatsHist copy/clone.
  Now is. I seem to remember mention of something similar being zero before,
  but can't find the bug report.

13 years agoBootstrapped
Automatic source maintenance [Wed, 30 May 2012 00:24:55 +0000 (18:24 -0600)] 
Bootstrapped

13 years agoBug 3526: digest authentication crash
Frederic Bourgeois [Mon, 28 May 2012 06:35:37 +0000 (00:35 -0600)] 
Bug 3526: digest authentication crash

13 years agoBug 3545: FreeBSD dnsserver segfaults
Marcin Wisnicki [Mon, 28 May 2012 06:32:10 +0000 (00:32 -0600)] 
Bug 3545: FreeBSD dnsserver segfaults

13 years agoBug 3186: Digest auth caches failed state without revalidating
Will Roberts [Mon, 28 May 2012 06:30:39 +0000 (00:30 -0600)] 
Bug 3186: Digest auth caches failed state without revalidating

13 years agoPortability fix: remove GNU-specific syntax
Amos Jeffries [Mon, 28 May 2012 06:28:43 +0000 (00:28 -0600)] 
Portability fix: remove GNU-specific syntax

detected by clang++.

13 years agoBug 3537: statistics histogram leaks memory
Timo Teras [Mon, 21 May 2012 03:59:19 +0000 (21:59 -0600)] 
Bug 3537: statistics histogram leaks memory

13 years agoLog TCP_REDIRECT when Squid generates a 300-399 status response
Amos Jeffries [Mon, 21 May 2012 03:52:08 +0000 (21:52 -0600)] 
Log TCP_REDIRECT when Squid generates a 300-399 status response

To identify when 3xx is received from upstream or generated by Squid.

3xx from servers or ICAP/eCAP will continue to use TCP_MISS
and other status codes.

13 years agoBug 3466: Adaptation stuck on last single-byte body piece
Alex Rousskov [Mon, 21 May 2012 02:57:33 +0000 (20:57 -0600)] 
Bug 3466: Adaptation stuck on last single-byte body piece

Changed StoreEntry::bytesWanted(range) to return range.end when the entry can
accommodate range.end bytes. This makes it possible to use that method for
single-byte ranges. Old code returned zero for such ranges, which was
difficult to distinguish from situations where no bytes were wanted at all.

TODO: The StoreEntry::bytesWanted(range) API is left undocumented because it
seems to be slightly broken and/or inconsistent with callers and with the
DelayId::bytesWanted(min, max) API. AFAICT, we should convert
StoreEntry::bytesWanted API from range-based to min/max-based or even just
max-based.

Store Entry API does not use the lower end of the range (except for the
now-removed assertion that the range is not empty). I suspect that Store API
was meant to be used with (first, last+1) "byte position" parameters (returning
the number of bytes wanted) while the DelayId API was meant to be used with
(min, max) "number of bytes" parameters.  However, StoreEntry::bytesWanted
implementation does not follow this assumption so perhaps my speculation is
wrong and there are more problems, including this change.

13 years agoRegister status 308 permanent redirect
Amos Jeffries [Mon, 21 May 2012 02:35:41 +0000 (20:35 -0600)] 
Register status 308 permanent redirect

* relay "Permanent Redirect" message on status line
* MAY cache these responses with heuristics
* accept this status as a redirect status from URL redirectors

13 years agoBug 3258: Requests hang when Host forgery verify fails
Guy Helmer [Sat, 5 May 2012 23:55:14 +0000 (17:55 -0600)] 
Bug 3258: Requests hang when Host forgery verify fails

13 years agoMark verified intercept traffic correctly after DNS lookup
Alexander Komyagin [Sat, 5 May 2012 23:53:44 +0000 (17:53 -0600)] 
Mark verified intercept traffic correctly after DNS lookup

13 years agoBug 3484: Docs: sslproxy_cert_error example flawed
Alex Rousskov [Sun, 15 Apr 2012 04:55:34 +0000 (22:55 -0600)] 
Bug 3484: Docs: sslproxy_cert_error example flawed

Synced ACL name after ACL type change.

This is still far from perfect because dstdomain is not really a FAST ACL
either: Its documentation says that it becomes slow on IP addresses.

13 years ago3.2.0.17 SQUID_3_2_0_17
Amos Jeffries [Thu, 12 Apr 2012 13:42:36 +0000 (07:42 -0600)] 
3.2.0.17

13 years agoBug 3484: Docs: sslproxy_cert_error example flawed
Guy Helmer [Thu, 12 Apr 2012 13:29:28 +0000 (07:29 -0600)] 
Bug 3484: Docs: sslproxy_cert_error example flawed

13 years agoTypo in cachemgr CGI manual
Amos Jeffries [Thu, 12 Apr 2012 13:28:02 +0000 (07:28 -0600)] 
Typo in cachemgr CGI manual

13 years agoBug 3441: Part 3: Replace corrupted v1 swap.state with new v2 format.
Alex Rousskov [Wed, 11 Apr 2012 09:45:41 +0000 (03:45 -0600)] 
Bug 3441: Part 3: Replace corrupted v1 swap.state with new v2 format.

A fix for bug 3408 changed the offset at which we start writing dirty
swap.state entries from StoreSwapLogHeader::record_size to StoreSwapLogHeader
size.  However, the log-reading code still read the entries starting from the
old offset (which is required to remain compatible with how a clean swap.state
is written).

Wrong starting offset essentially means that the vast majority of read
swap.state entries were bogus. They could only match some real entry when 64*n
is divisible by 12 and perhaps when their random data just happened to match a
real entry. Part 2 of this bug fix (trunk r11995) started to pad the [dirty]
swap.state header to start entry writing at StoreSwapLogHeader::record_size
boundary.

Changes specific to Part 3:

Unfortunately, since old v1 logs could contain completely bogus entries as the
result of being read (at some point) from the wrong offset, we should not load
v1 logs any more (neither dirty nor clean because what looks clean now could
be based on a previously dirty and, hence, corrupted log). This forced us to
raise the swap.state format version from 1 to 2.

After this change, if a v1 swap log is detected, Squid ignores it and does a
from-directory rebuild as if no swap.state files were found.

Since we had to change swap.state format version, we also made log entry size
and composition the same across virtually all platforms; added checksums so
that a similar bug would not go unnoticed for so long (and would not result in
log corruption); and increased the size of time-related entries to avoid the
"year 2038" problem.

The swap log entries are still written to disk in host byte order.

We now also zero the [dirty] swap.state header padding to prevent random and
potentially sensitive garbage in logs.

Cache index rebuild kinds are now reported using the following three labels:

* Rebuild using a swap log created by Squid during clean shutdown: "clean log"
* Rebuild using a swap log accumulated by a running Squid: "dirty log"
* Rebuild using directory scan: "no log"

The first kind used to be reported as CLEAN and the other two as DIRTY rebuild.

13 years agoBug 3527: EUI compile errors on Mac OS X 10.5.8 PPC
Amos Jeffries [Wed, 11 Apr 2012 09:40:35 +0000 (03:40 -0600)] 
Bug 3527: EUI compile errors on Mac OS X 10.5.8 PPC

13 years agoBug 3505: crash in CbcPointer<Comm::ConnOpener> constructor
Alex Rousskov [Tue, 10 Apr 2012 12:14:30 +0000 (06:14 -0600)] 
Bug 3505: crash in CbcPointer<Comm::ConnOpener> constructor

13 years agoNULL defined by our compat/types.h
Amos Jeffries [Tue, 10 Apr 2012 12:12:50 +0000 (06:12 -0600)] 
NULL defined by our compat/types.h

13 years agoPolish: de-duplicate UDP port dialers
Amos Jeffries [Tue, 10 Apr 2012 12:12:00 +0000 (06:12 -0600)] 
Polish: de-duplicate UDP port dialers

This create a Comm::UdpOpenDialer class which replaces the ICP, HTCP and
SNMP start-listening dialer classes. Their code was very close to
identical anyway.

ICP and HTCP can now also use the dialer Comm::Connection parameter
instead of assuming that the callback relates to the global incoming
port variable.

13 years agoBug 3193: NTLM decoder truncating strings
Amos Jeffries [Tue, 10 Apr 2012 12:08:32 +0000 (06:08 -0600)] 
Bug 3193: NTLM decoder truncating strings

* Also ntlm_unpack_auth using reversed arguments for memcpy()
* Also improved packet structure debug display

13 years agoMaintenance: ensure stub_* files are always bundled
Amos Jeffries [Mon, 2 Apr 2012 02:50:41 +0000 (20:50 -0600)] 
Maintenance: ensure stub_* files are always bundled

Relying on dependency chains does not always work for stubs.
Builds automake list of files to bundle and add to EXTRA_DIST for
bundling.

13 years agoBug 3397: do not mark connection as opened until after SYN-ACK
Amos Jeffries [Mon, 2 Apr 2012 02:33:40 +0000 (20:33 -0600)] 
Bug 3397: do not mark connection as opened until after SYN-ACK

assertion failed: comm.cc:1117: "isOpen(fd)" on FwdState destruct with
half-connected server. When the SYN was sent but ACK not yet received.

13 years agoSolaris: definitions of AF_LOCAL and strsep()
Jose-Marcio Martins da Cruz [Fri, 16 Mar 2012 00:57:44 +0000 (18:57 -0600)] 
Solaris: definitions of AF_LOCAL and strsep()

13 years agoSolaris: Dist the krb5 patch
Amos Jeffries [Fri, 16 Mar 2012 00:56:45 +0000 (18:56 -0600)] 
Solaris: Dist the krb5 patch

13 years agoSolaris: define SUN_LEN()
Alexander Lukyanov [Fri, 16 Mar 2012 00:55:26 +0000 (18:55 -0600)] 
Solaris: define SUN_LEN()

13 years agoWindows: use Comm::Connection ICP sockets
Amos Jeffries [Fri, 16 Mar 2012 00:54:17 +0000 (18:54 -0600)] 
Windows: use Comm::Connection ICP sockets

13 years agoWindows: Use FD_ISSET() wrapper instead of __WSAFDIsSet()
Amos Jeffries [Fri, 16 Mar 2012 00:53:30 +0000 (18:53 -0600)] 
Windows: Use FD_ISSET() wrapper instead of __WSAFDIsSet()

This moves the Win32-specific select() module a lot closer to the
non-Windows select() module.

13 years agoBug 3263: ssl_crtd: undefined references to squid_curtime
Alex Rousskov [Fri, 16 Mar 2012 00:52:11 +0000 (18:52 -0600)] 
Bug 3263: ssl_crtd: undefined references to squid_curtime

13 years agoBug 3439: correct external_acl_type documented default for ipv4/ipv6 option
Amos Jeffries [Fri, 16 Mar 2012 00:50:40 +0000 (18:50 -0600)] 
Bug 3439: correct external_acl_type documented default for ipv4/ipv6 option

13 years agoBug 3509: kQueue compile error
Warren Baker [Wed, 7 Mar 2012 12:38:31 +0000 (05:38 -0700)] 
Bug 3509: kQueue compile error

13 years ago3.2.0.16 SQUID_3_2_0_16
Amos Jeffries [Wed, 7 Mar 2012 02:41:56 +0000 (19:41 -0700)] 
3.2.0.16

13 years agoBug 3458: Icon Serving (squid-internal-static) Broken
Alex Rousskov [Wed, 7 Mar 2012 02:33:35 +0000 (19:33 -0700)] 
Bug 3458: Icon Serving (squid-internal-static) Broken

13 years agoBug 3420: Request body consumption races and theConsumer
Alex Rousskov [Wed, 7 Mar 2012 00:40:42 +0000 (17:40 -0700)] 
Bug 3420: Request body consumption races and theConsumer

13 years agoBug 3508: Correct DNS timeout handling.
Henrik Nordstrom [Wed, 7 Mar 2012 00:37:37 +0000 (17:37 -0700)] 
Bug 3508: Correct DNS timeout handling.

The change to concurrent A & AAAA lookups did not handle timeouts
properly, resulting in segmentation faults.

The timeouts as such were also mismanaged, resulting in much longer
DNS timeouts than intended.

This also cleans up the API somewhat to use const for the result.

13 years agoBreak out assignment from if clause to make code more readable (and gcc happier)
Henrik Nordstrom [Wed, 7 Mar 2012 00:35:22 +0000 (17:35 -0700)] 
Break out assignment from if clause to make code more readable (and gcc happier)