]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoWindows: Ensure array index is an integer in C code
Amos Jeffries [Tue, 19 Nov 2013 22:47:21 +0000 (15:47 -0700)] 
Windows: Ensure array index is an integer in C code

MSVC compiler does not accet non-integer types for array indexes so we
must cast these CHAR index values to int before use.

 This is an iCelero Inc sponsored fix.

11 years agoBug 3956: xstrndup: tried to dup a NULL pointer
Frederic Bourgeois [Tue, 19 Nov 2013 22:46:53 +0000 (15:46 -0700)] 
Bug 3956: xstrndup: tried to dup a NULL pointer

11 years agoDocs: update mention of URL-rewrit helper result codes
Amos Jeffries [Tue, 19 Nov 2013 22:45:48 +0000 (15:45 -0700)] 
Docs: update mention of URL-rewrit helper result codes

- OK action when no redirect/rewrite kv-pairs was not mentioned
- BH message= kv-pair was not mentioned.

11 years agoMake HTTP header parser obey relaxed_header_parser
Amos Jeffries [Tue, 19 Nov 2013 22:45:02 +0000 (15:45 -0700)] 
Make HTTP header parser obey relaxed_header_parser

Some unimportant warnings were not obeying the directives silent/loud
setting values.
This abstracts the condition to simplify code and make all the
non-critical warnings depend on the directive for their display level.

11 years agoSource Maintenance: re-add snapshot script to branch
Amos Jeffries [Mon, 18 Nov 2013 11:29:19 +0000 (04:29 -0700)] 
Source Maintenance: re-add snapshot script to branch

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 11 Nov 2013 02:49:21 +0000 (19:49 -0700)] 
SourceFormat Enforcement

11 years agoReplace blocking sleep(3) and close UDS socket on failures.
Alex Rousskov [Sun, 10 Nov 2013 23:01:35 +0000 (16:01 -0700)] 
Replace blocking sleep(3) and close UDS socket on failures.

The two addressed XXX were not causing any known serious bugs on their own,
but the blocking sleep was ugly and possibly in the way of further
kid registration fixes/improvements.

11 years agoBug 3936: error-details.txt parse error
Christos Tsantilas [Sun, 10 Nov 2013 22:55:16 +0000 (15:55 -0700)] 
Bug 3936: error-details.txt parse error

Squid fails parsing error-details.txt template when one or more listed
OpenSSL errors are not supported on running platform.
This patch add a hardcoded list of OpenSSL errors wich can be optional.

This is a Measurement Factory project

11 years agoBug 3906: Filedescriptor leaks in SNMP
Christos Tsantilas [Sun, 10 Nov 2013 22:53:07 +0000 (15:53 -0700)] 
Bug 3906: Filedescriptor leaks in SNMP

Coordinator should not send SNMP client FD to strands when broadcasting SNMP
requests. Strands do not need the descriptor and were forgetting to close it,
causing one FD leak on every SNMP query in SMP mode.

Enhance Ipc::TypedMsgHdr to be able to tell whether the message has a FD.

This is a Measurement Factory project

11 years agoPrep for 3.3.10
Amos Jeffries [Sun, 3 Nov 2013 08:53:29 +0000 (01:53 -0700)] 
Prep for 3.3.10

11 years agokerberos_ldap_group: fix LDAP string duplication
Markus Moeller [Fri, 1 Nov 2013 01:26:24 +0000 (19:26 -0600)] 
kerberos_ldap_group: fix LDAP string duplication

11 years agoAvoid "hot idle": A series of rapid select() calls with zero timeout.
Alex Rousskov [Fri, 1 Nov 2013 01:25:17 +0000 (19:25 -0600)] 
Avoid "hot idle": A series of rapid select() calls with zero timeout.

Squid uses "infinite" precision when it comes to deciding whether the next
timed event is ready but uses millisecond (1e-3) precision when deciding how
long to wait before the next event will be ready. This inconsistency results
in the EventScheduler engine telling the main loop that it has 0 milliseconds
to poll pending I/O, but when asked again (after the I/O is quickly polled),
the EventScheduler engine often does not schedule the promised event and tells
the main loop to poll for another 0 milliseconds again. This cycling may
happen many times in a row (until enough time is wasted for the next event to
become ready using higher precision).

The fixed code adds a minimum 1ms delay for not-yet-ready events. It also
places both decisions into one method (EventScheduler::timeRemaining), and
tries to polish/document decision logic (which is more complex than it may
seem) because the code has to avoid both inconsistent decisions and hot idle
loops while maintaining the traditional "no event is fired before it is due"
guarantee.

TODO: Idle Squid still runs hotter than it should because the maximum waiting
time is artificially capped outside the event queue to EVENT_LOOP_TIMEOUT=1s.
This causes at most one extra loop iteration per second.

11 years agoBug 3887: tcp_outgoing_tos not working for IPv6
Amos Jeffries [Fri, 1 Nov 2013 01:24:12 +0000 (19:24 -0600)] 
Bug 3887: tcp_outgoing_tos not working for IPv6

11 years agoFix cbdata 'error: expression result unused' errors
Amos Jeffries [Fri, 1 Nov 2013 01:23:11 +0000 (19:23 -0600)] 
Fix cbdata 'error: expression result unused' errors

Detected by Clang.

11 years agoRevert -march-native experiment that snuck into rev.13048
Amos Jeffries [Fri, 1 Nov 2013 01:22:23 +0000 (19:22 -0600)] 
Revert -march-native experiment that snuck into rev.13048

11 years agoHave testRock use cachemgr stubs
Francesco Chemolli [Thu, 24 Oct 2013 15:11:49 +0000 (09:11 -0600)] 
Have testRock use cachemgr stubs

11 years agobasic_nis_auth: Improved portability
Francesco Chemolli [Thu, 24 Oct 2013 15:11:16 +0000 (09:11 -0600)] 
basic_nis_auth: Improved portability

11 years agoBug 3836: Fix issues with automake 1.13 and later and make check
Francesco Chemolli [Thu, 24 Oct 2013 15:09:12 +0000 (09:09 -0600)] 
Bug 3836: Fix issues with automake 1.13 and later and make check

11 years agoAppend Connection:close to OPTIONS requests when icap_persistent_connections is off.
Nathan Hoad [Thu, 24 Oct 2013 15:07:27 +0000 (09:07 -0600)] 
Append Connection:close to OPTIONS requests when icap_persistent_connections is off.

This brings OPTIONS requests behavior inline with REQMOD and RESPMOD.

11 years agoBug 3941: Release notes typo
Amos Jeffries [Wed, 23 Oct 2013 05:12:15 +0000 (23:12 -0600)] 
Bug 3941: Release notes typo

11 years agoAdd cache_miss_revalidate
Amos Jeffries [Wed, 23 Oct 2013 05:11:22 +0000 (23:11 -0600)] 
Add cache_miss_revalidate

Port of 2.7 ignore_ims_on_miss directive by Henrik Nordstrom.

This on/off switch enables Squid to convert conditional requests from
clients to non-conditional fetches that can fill the cache faster under
cold-start conditions.

11 years agoBug 3480: StoreEntry::kickProducer() segfaults in store_client::copy()
Alex Rousskov [Wed, 23 Oct 2013 05:10:17 +0000 (23:10 -0600)] 
Bug 3480: StoreEntry::kickProducer() segfaults in store_client::copy()
context

Short-term fix: Lock StoreEntry object so that it is not freed by
storeClientCopy2() callbacks. Also lock StoreEntry in storeUnregister()
context because an aborting entry may be deleted there unless it is
double-locked.

See bug 3480 comment #27 for detailed call stack analysis. Additional
cases
include rejected copied HIT due to Var mismatch and hits blocked by
reply_from_cache directive (under development; see bug 3937).

Long-term, we need to make store copying asynchronous and revise
StoreEntry
locking approach.

11 years agoFix CBDATA_CLASS2 macro definition
Amos Jeffries [Sun, 13 Oct 2013 13:41:55 +0000 (07:41 -0600)] 
Fix CBDATA_CLASS2 macro definition

CBDATA_UNKNOWN was being used in place of a void no-op statement.
This was incorrect and useless. Now that the value definition is fixed
it is being picked up by the stricter compilers.
Replace the trinary conditional with an if-statement.

11 years agolibntlmauth: Fix string field truncation
Elmar Vonlanthen [Sun, 13 Oct 2013 13:33:55 +0000 (07:33 -0600)] 
libntlmauth: Fix string field truncation

Count of field bytes must begin at 0. Otherwise the decoder truncates
1 byte from the string due to lstring initial state values.

Also drop the lstring_zero(s) macro. It is only used in one place and
calling it 'zero' obscures that length is non-zero for invalid state.

11 years agontlm_fake_auth: pass DOMAIN data to Squid in original case
Elmar Vonlanthen [Sun, 13 Oct 2013 13:32:49 +0000 (07:32 -0600)] 
ntlm_fake_auth: pass DOMAIN data to Squid in original case

Lower-casing the domain field can cause base ACL match results if the
ACL is checking for case-sensitive or upper-case domain label.

The helper should be emitting the standard UPPER case domain and many
administrators will be expecting taht when they write ACLs.

11 years agoFix SQUID_CC_CHECK_ARGUMENT autoconf macro
Francesco Chemolli [Mon, 7 Oct 2013 12:35:02 +0000 (06:35 -0600)] 
Fix SQUID_CC_CHECK_ARGUMENT autoconf macro

11 years ago3.4.0.2 SQUID_3_4_0_2
Amos Jeffries [Thu, 3 Oct 2013 12:32:14 +0000 (06:32 -0600)] 
3.4.0.2

11 years agoAdd --disable-arch-native build option
Amos Jeffries [Thu, 3 Oct 2013 11:12:31 +0000 (05:12 -0600)] 
Add --disable-arch-native build option

The -march-native option is required by Clang 3.2 on some CPU
and produces better optimization in binaries by GCC.
But building inside a virtual machine environment has been found to
cause random Illegal Instruction errors due to mis-detection of CPU.

This option is added to permit selective disabling of teh preferred
default (which is to use the compiler flag when available).

11 years agoPolish: better WARNING when workers directive is ignore on reconfigure.
Amos Jeffries [Thu, 3 Oct 2013 11:11:37 +0000 (05:11 -0600)] 
Polish: better WARNING when workers directive is ignore on reconfigure.

Changing the workers directive requires a proxy restart, not just a
reconfigure. State this clearly in the warning message.

11 years agoFix various header build issues in librfcnb
Amos Jeffries [Thu, 3 Oct 2013 11:10:43 +0000 (05:10 -0600)] 
Fix various header build issues in librfcnb

Highlighted when the #include sorting was applied to lib/rfcnb/ files
several of the headers were using order-dependent definitions and were
not wrapped with sfety macros.

11 years agoPortability: cleanup includes for sys/time.h and sys/resource.h
Amos Jeffries [Thu, 3 Oct 2013 11:02:34 +0000 (05:02 -0600)] 
Portability: cleanup includes for sys/time.h and sys/resource.h

These two include files are order-dependent on several operating systems
and as such are provided by Squid libcompat headers. There is no need for
code to include them specially and several HAVE_SYS_TIME_H macros were
missing which breaks the build on systems where the file is missing.

11 years agonegotiate_kerberos_auth: upgrade to present group= keys
Markus Moeller [Thu, 3 Oct 2013 10:47:40 +0000 (04:47 -0600)] 
negotiate_kerberos_auth: upgrade to present group= keys

Use the new kv-pair protocol extensions for emitting group details
directly at the time of authentication. group=X key-value pair is
used to emit the Kerberos SIDS values presented by MS Active
Directory environments.

Also, update the Hiemdal library support for recent library versions.

Also, polish the Kerberos and LDAP Group related code to avoid memory
leaks and improve C++ coding style.

11 years agoUse IPv6 localhost nameserver on DNS configuration errors
Amos Jeffries [Thu, 3 Oct 2013 10:38:31 +0000 (04:38 -0600)] 
Use IPv6 localhost nameserver on DNS configuration errors

When DNS configuration fails to locate a set of nameservers "localhost"
is used as the default but has previously only been setting 127.0.0.1
IPv4 address for localhost. This enables the failover to work as
designed
on IPv6-only networks.

11 years agoBug 3914: partial: make squidclient tool build cleanly with -Wconversion
Amos Jeffries [Sun, 29 Sep 2013 14:50:25 +0000 (08:50 -0600)] 
Bug 3914: partial: make squidclient tool build cleanly with -Wconversion

11 years agoBug 3923: cbdata and undefined behavior due to dynamic runtime enumeration
'noloader' [Sun, 29 Sep 2013 14:31:05 +0000 (08:31 -0600)] 
Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration

11 years agoBug 3918: Squid 3.3.9 Self Test Failures on Mac OS X 10.8
Alex Rousskov [Sun, 29 Sep 2013 14:21:14 +0000 (08:21 -0600)] 
Bug 3918: Squid 3.3.9 Self Test Failures on Mac OS X 10.8

11 years agoBug 3929: request_header_add not working for tunnel requests
libit [Sun, 29 Sep 2013 14:08:23 +0000 (08:08 -0600)] 
Bug 3929: request_header_add not working for tunnel requests

11 years agoPolish: report bytes received when bad content-length detected by quick-abort
Amos Jeffries [Sun, 29 Sep 2013 13:45:05 +0000 (07:45 -0600)] 
Polish: report bytes received when bad content-length detected by quick-abort

11 years agoFix pinning hierarchy log information
Amos Jeffries [Sun, 29 Sep 2013 13:41:32 +0000 (07:41 -0600)] 
Fix pinning hierarchy log information

11 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 29 Sep 2013 00:47:35 +0000 (18:47 -0600)] 
SourceFormat Enforcement

11 years agoRegression Bug 3891: squid.conf parser errors in 3.4.0.1
Alex Rousskov [Sat, 28 Sep 2013 15:38:33 +0000 (09:38 -0600)] 
Regression Bug 3891: squid.conf parser errors in 3.4.0.1

Alternative implementation for configuration_includes_quoted_values and
quoted string support in squid.conf that avoids the extensions attempted
in 3.4.0.1 leading to parse errors from overly strict parsing of all
directives parameters.

Documentation updated by Amos Jeffries, Treehouse Networks Ltd.

11 years agoRevert squid.conf parser updates rev. 12949, 12952, 12960, 12964
Amos Jeffries [Sat, 28 Sep 2013 13:03:58 +0000 (07:03 -0600)] 
Revert squid.conf parser updates rev. 12949, 12952, 12960, 12964

This feature has turned out to be more buggy than previously thought.
After a very log series of discussions the upgrade has been re-thought
and will not include this code in 3.4 series.

11 years agoPrep for 3.3.9
Amos Jeffries [Wed, 11 Sep 2013 01:31:31 +0000 (19:31 -0600)] 
Prep for 3.3.9

11 years agoWindows: locate CMSG definitions in Winsock2.h when present
Amos Jeffries [Mon, 9 Sep 2013 01:51:53 +0000 (19:51 -0600)] 
Windows: locate CMSG definitions in Winsock2.h when present

Windows defines the CMSG macros in Winsock2.h sometimes. This allows the
definitions there to be used when present and avoids compiler errors
about double definitions.

  This is an iCelero project.

11 years agoBug 3849: Duplicate certificate sent when using https_port
Christos Tsantilas [Mon, 9 Sep 2013 01:51:04 +0000 (19:51 -0600)] 
Bug 3849: Duplicate certificate sent when using https_port

The certificate file given with the "cert=" option it may contain a list of
certificates to be chained to the SSL client, for example intermediate
certificates.

The bug caused because in the certificates  chain we are storing also the
certificate of the port. This is works well for SSL-bump because squid
generates a certificate which uses the port certificate as CA certificate.
But in the case of https_port without bumping the port certificate is sent
twice, one as SSL server certificate and one as chained certificate.

This patch try to chain port certificate only when the sslbump is used.

This is a Measurement Factory project

11 years agoFix myportname ACL on ICAP/eCAP transactions
Amos Jeffries [Mon, 9 Sep 2013 01:49:56 +0000 (19:49 -0600)] 
Fix myportname ACL on ICAP/eCAP transactions

The port name from http_port/https_port was not being propigated to
adapted reqeusts after ICAP/eCAP. Which makes the myportname ACL and
logging of portname not work on adapted requests.

 This is an iCelero Project

11 years agoWindows: document the purpose and use of Squid namespace wrappers
Amos Jeffries [Mon, 9 Sep 2013 01:48:44 +0000 (19:48 -0600)] 
Windows: document the purpose and use of Squid namespace wrappers

Also, add some missing #define's

  This is an iCelero project

11 years agoWindows: fix IPv6 split-stack support
Amos Jeffries [Mon, 9 Sep 2013 01:48:09 +0000 (19:48 -0600)] 
Windows: fix IPv6 split-stack support

Some builds of MinGW do not define IPV6_V6ONLY socket option.

  This is an iCelero project

11 years agoWindows: fix collision between POSIX wrappers and DiskIO class methods
Amos Jeffries [Mon, 9 Sep 2013 01:47:32 +0000 (19:47 -0600)] 
Windows: fix collision between POSIX wrappers and DiskIO class methods

The POSIX function shutdown() is #define'd on Windows. This causes
compiler issues with the DiskIO method of same name. Rename the method
to gracefulShutdown() instead.

Also, Bug 3189 was incomplete and missed a change to DiskThreads
Windows initialization method.

  This is an iCelero project.

11 years agoRegression fix: revert rev.12815 MinGW C++11 support
Amos Jeffries [Mon, 9 Sep 2013 01:46:31 +0000 (19:46 -0600)] 
Regression fix: revert rev.12815 MinGW C++11 support

MinGW supports c++11 but in ANSI-strict way. Squid code still contains
non-standard strcasecmp strncasecmp and possibly other functions.

  This is a iCelero Project.

11 years agoPolish: typo in debug for SSL-bumping
John Xue [Mon, 9 Sep 2013 01:46:00 +0000 (19:46 -0600)] 
Polish: typo in debug for SSL-bumping

11 years agoWindows: fix getopt.c build error with MinGW
Amos Jeffries [Mon, 9 Sep 2013 01:34:42 +0000 (19:34 -0600)] 
Windows: fix getopt.c build error with MinGW

Resolve warning 'initialization discards const qualifieer from pointer'.

  This is an iCelero project.

11 years agoImproved compatibility with clang and icc
Francesco Chemolli [Mon, 9 Sep 2013 01:34:06 +0000 (19:34 -0600)] 
Improved compatibility with clang and icc

11 years agoBug 3895: fix acl_uses_indirect_client and cache_peer_access
David Isaacs [Mon, 9 Sep 2013 01:32:54 +0000 (19:32 -0600)] 
Bug 3895: fix acl_uses_indirect_client and cache_peer_access

11 years agoClose idle client connections associated with closed idle pinned connections.
Alex Rousskov [Mon, 9 Sep 2013 01:31:30 +0000 (19:31 -0600)] 
Close idle client connections associated with closed idle pinned connections.

Squid was not monitoring idle persistent connections pinned to servers. Squid
would discover that the pinned server connection is closed only after
receiving a new request on the idle client connection and trying to write that
request to the server. In such cases, Squid propagates the pinned connection
closure to the client (as it should).

Chrome and, to a lesser extent, Firefox handle such races by opening a new
connection and resending the failed [idempotent] request transparently to the
user. However, IE usually displays an error page to the user.

While some pconn races cannot be avoided, without monitoring idle pconns,
Squid virtually guaranteed such a race in environments where origin server
idle connection timeout is smaller than client/Squid timeouts and users
are revisiting pages in the window between those two timeouts.

Squid now monitors idle pinned connections similar to idle connections in the
pconn pool and closes the corresponding idle client connection to keep the two
sides in sync (to the extent possible).

It is theoretically possible that this change will break servers that send
whitespace on an idle persistent connection or perhaps send some SSL keepalive
traffic. No such cases are known to exist though.

11 years agoWindows: Fix ConnOpener::sleep() collision with global macro
Amos Jeffries [Mon, 9 Sep 2013 01:30:09 +0000 (19:30 -0600)] 
Windows: Fix ConnOpener::sleep() collision with global macro

Squid compat library defines sleep() as a wrapper macro which
collides with the member definition in Comm::ConnOpener.

 This is an iCelero project

11 years agoShow number of available filedescriptors when reserved FD changes
Amos Jeffries [Mon, 9 Sep 2013 01:29:06 +0000 (19:29 -0600)] 
Show number of available filedescriptors when reserved FD changes

11 years agoRegression Bug 3077: off-by-one error in Digest header decoding
Jan Sievers [Mon, 9 Sep 2013 01:25:12 +0000 (19:25 -0600)] 
Regression Bug 3077: off-by-one error in Digest header decoding

This is a regression in the 3.2 and later version of the original bug
fix patch.

The effect is that all attributes are treated as quoted-string values
with unescaping performed. This ends with credentials wrongly being
rejected as invalid.

11 years agoDocs: Update SPONSORS listing
Amos Jeffries [Sun, 8 Sep 2013 03:52:35 +0000 (21:52 -0600)] 
Docs: Update SPONSORS listing

11 years agoEnsure that the SQUID_BUILD_INFO macro is always defined
Francesco Chemolli [Sun, 8 Sep 2013 03:23:20 +0000 (21:23 -0600)] 
Ensure that the SQUID_BUILD_INFO macro is always defined

11 years agoDisplay Build-Info in cache manager info report
Amos Jeffries [Sun, 8 Sep 2013 03:22:37 +0000 (21:22 -0600)] 
Display Build-Info in cache manager info report

This info can be quite useful for tracking which patched build of Squid
is being used to produce the report.

12 years agoRegister Http2-Settings header
Amos Jeffries [Thu, 8 Aug 2013 06:08:37 +0000 (00:08 -0600)] 
Register Http2-Settings header

This header ia a hop-by-hop request-only header and requires stripping
by intermediaries which do not support HTTP/2.0 in Upgrade feature.

We register it now to ensure the stripping occurs even if broken clients
omit it from the Connection header list.

12 years agoFix configure parsing IP/domain directives
Amos Jeffries [Thu, 8 Aug 2013 06:08:02 +0000 (00:08 -0600)] 
Fix configure parsing IP/domain directives

Squid would semi-silently accept invalid IP address or hostname in some
directives which required them (eg wccp_router) and use the magic
IP_ANYADDR value. This change makes configure halt with a FATAL error
instead.

 Detected by Coverity Scan. Issue 1057286.

12 years agoHandle NTLM helper returning OK without user= value
Amos Jeffries [Thu, 8 Aug 2013 06:06:58 +0000 (00:06 -0600)] 
Handle NTLM helper returning OK without user= value

Prevent crash by treating this case as an error and failed
authentication

 Detected by Coverity Scan. Issue 1020656.

12 years agoFix memory leak in refresh_pattern parsing
Amos Jeffries [Thu, 8 Aug 2013 06:06:04 +0000 (00:06 -0600)] 
Fix memory leak in refresh_pattern parsing

Occurs when refresh_pattern is configure with invalid regex pattern.

 Detected by Coverity Scan. Issue 1058882.

12 years agoAdd dns_multicast_local to control mDNS operation
Amos Jeffries [Thu, 8 Aug 2013 06:04:47 +0000 (00:04 -0600)] 
Add dns_multicast_local to control mDNS operation

Enable admin control over whether mDNS operates or not. Set the default
to OFF due to .arpa reverse-DNS requests causing a rise in traffic from
this feature even on networks without mDNS responders setup.

Also, polish cachemgr idns report to show for queued queries which
resolver type and query the entry is involving. mDNS can cause a queue
to exist as some lookups timeout on the mDNS resolvers.

12 years agoSync with newest OpenSSL error codes
Christos Tsantilas [Thu, 8 Aug 2013 06:04:06 +0000 (00:04 -0600)] 
Sync with newest OpenSSL error codes

This patch updates Squid list of errors to handle the ones available in
newer
OpenSSL versions.

  This is a Measurement Factory project

12 years agoFix debugs when refresh_pattern is missing the regex pattern
Amos Jeffries [Thu, 8 Aug 2013 06:03:04 +0000 (00:03 -0600)] 
Fix debugs when refresh_pattern is missing the regex pattern

This is a very rare situation and may not be completely required. But it
did hinder debugging of refresh_pattern when the regex field token was
broken by parser updates.

12 years agoFix 'ERROR: A percentage value is missing.'
Amos Jeffries [Thu, 8 Aug 2013 06:02:22 +0000 (00:02 -0600)] 
Fix 'ERROR: A percentage value is missing.'

This usage of strtok() appears to have been omitted from rev.12949

12 years agoHandle infinite certificate validation loops caused by OpenSSL bug #3090.
Christos Tsantilas [Thu, 8 Aug 2013 06:00:28 +0000 (00:00 -0600)] 
Handle infinite certificate validation loops caused by OpenSSL bug #3090.

If OpenSSL is stuck in a validation loop, Squid breaks the loop and
triggers a
new custom SQUID_X509_V_ERR_INFINITE_VALIDATION SSL validation error.
That
error cannot be bypassed using sslproxy_cert_error because to break the
loop
Squid has to tell OpenSSL that the certificate is invalid, which
terminates
the SSL connection.

Validation loops exceeding SQUID_CERT_VALIDATION_ITERATION_MAX
iterations
are deemed infinite. That macro is defined to be 16384, but that default
can
be overwritten using CPPFLAGS.

  This is a Measurement Factory project

12 years agoRelease Notes: fix typo in ./configure options
Amos Jeffries [Thu, 8 Aug 2013 05:59:21 +0000 (23:59 -0600)] 
Release Notes: fix typo in ./configure options

12 years ago3.4.0.1 SQUID_3_4_0_1
Amos Jeffries [Sun, 28 Jul 2013 22:45:33 +0000 (16:45 -0600)] 
3.4.0.1

12 years agoSet configuration_includes_quoted_values to OFF by default in 3.4
Amos Jeffries [Sun, 28 Jul 2013 22:15:01 +0000 (16:15 -0600)] 
Set configuration_includes_quoted_values to OFF by default in 3.4

Early testers have shown that bot hthe parameters() and $-macro detection
is not working at intended in some common situations. ie wheneverr the
config contains regex with '()' brackets or quoted $ anchor.

Leaving 3.HEAD default as ON for now to encourage a fix.

12 years agoMake GCC 4.8 happy with libip code
Amos Jeffries [Fri, 26 Jul 2013 11:29:14 +0000 (05:29 -0600)] 
Make GCC 4.8 happy with libip code

Invalid casting seems to confuse the ABI generator and results in
illegal instruction faults when the unit tests is run.
The class API is already const-correct so there is no need for the cast
to occur, and it should not be done on a non-pointer type anyway.

Also, fixes a missing "struct" type identifier found along the way.

12 years agoFix assert with side effects in ServerStateData::handleAdaptedHeader
Nathan Hoad [Fri, 26 Jul 2013 03:14:01 +0000 (21:14 -0600)] 
Fix assert with side effects in ServerStateData::handleAdaptedHeader

setConsumerIfNotLate conditionally schedules some async calls, so the
call definitely shouldn't be removed by the precompiler.

12 years agoFix mgr:info report 'Largest file desc currently in use' with SMP
Amos Jeffries [Fri, 26 Jul 2013 03:12:33 +0000 (21:12 -0600)] 
Fix mgr:info report 'Largest file desc currently in use' with SMP

The biggest FD in use should not be the sum of biggest FD in each worker,
but the maximum across all workers.

12 years agoBranch 3.4.0.0
Automatic source maintenance [Mon, 22 Jul 2013 09:23:40 +0000 (03:23 -0600)] 
Branch 3.4.0.0

12 years agoRelease Notes: fix typo
Amos Jeffries [Mon, 22 Jul 2013 05:15:37 +0000 (23:15 -0600)] 
Release Notes: fix typo

12 years agoRelease notes for multicast DNS support
Amos Jeffries [Mon, 22 Jul 2013 02:13:50 +0000 (20:13 -0600)] 
Release notes for multicast DNS support

12 years agoRelease notes for rev.12945
Amos Jeffries [Mon, 22 Jul 2013 01:57:39 +0000 (19:57 -0600)] 
Release notes for rev.12945

12 years agoFix return value of ConfigParser::strtokFile()
Amos Jeffries [Mon, 22 Jul 2013 01:26:09 +0000 (19:26 -0600)] 
Fix return value of ConfigParser::strtokFile()

12 years agoRelease Notes: document squid.conf quoting changes
Amos Jeffries [Sun, 21 Jul 2013 23:23:13 +0000 (17:23 -0600)] 
Release Notes: document squid.conf quoting changes

12 years agoRelease Notes: update squid.conf directive status
Amos Jeffries [Sun, 21 Jul 2013 23:02:09 +0000 (17:02 -0600)] 
Release Notes: update squid.conf directive status

12 years agoQuoted values in squid.conf
Christos Tsantilas [Sun, 21 Jul 2013 19:24:35 +0000 (22:24 +0300)] 
Quoted values in squid.conf

This patch :
  - adds support for quoted values in the entire squid.conf
  - warn about or prohibit values that can no longer be interpreted as
    either quoted strings or simple tokens
  - support parameters("/path/to/file.name") syntax to load external
    configuration files
  - Checks if macros allowed in "double quoted" values.
  - replaces the strtok() calls with calls to the new ConfigParser::NextToken()
  - modify strtokFile to use new ConfigParser::NextToken()
  - Add the new configuration_includes_quoted_values configuration option, to
    control the squid parser behaviour. If set to on Squid will recognize each
    "quoted string" after a configuration directive as a single parameter

This is a Measurement Factory project

12 years agoBug 3879: assertion failed ConnStateData::validatePinnedConnection
Martin Stolle [Thu, 18 Jul 2013 05:02:23 +0000 (23:02 -0600)] 
Bug 3879: assertion failed ConnStateData::validatePinnedConnection

12 years agoDocumented space() methods to explain why bugs like 3869 keep happening.
Alex Rousskov [Thu, 18 Jul 2013 02:07:31 +0000 (20:07 -0600)] 
Documented space() methods to explain why bugs like 3869 keep happening.

Hopefully we will not repeat these mistakes with StringNG.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 16 Jul 2013 00:13:03 +0000 (18:13 -0600)] 
SourceFormat Enforcement

12 years agoLog TOS and Netfilter marks set by Squid
Christos Tsantilas [Mon, 15 Jul 2013 15:47:00 +0000 (18:47 +0300)] 
Log TOS and Netfilter marks set by Squid

This patch add new logformat codes to log TOS/DSCP values and netfilter marks
for client and server connections. If multiple outgoing connections were used,
the last used connection value logged.
The values printed in hexadecimal form.
The logformat codes are:
   %>tos    Client connection tos mark set by Squid
   %<tos    Server connection tos mark set by Squid
   %>nfmark Client connection netfilter mark set by Squid
   %<nfmark Server connection netfilter mark set by Squid

This patch also modify qos related code to set Comm::Connection::nfmark and
Comm::Connection::tos members in Ip::Qos::setSockNfmark and Ip::Qos::setSockTos
methods. The Comm::Connection members are now set only if the tos and nfmark
set successfuly.

This is a Measurement Factory project

12 years agoBug 2287: Better fix for unsupported HTP version handling
Amos Jeffries [Mon, 15 Jul 2013 13:41:51 +0000 (07:41 -0600)] 
Bug 2287: Better fix for unsupported HTP version handling

RFC 2616 section 10.5.6 is more specifically about MAJOR versions.
Remove the criterion limiting 1.x minor version numbers.

12 years agoReload into If-None-Match
Christos Tsantilas [Mon, 15 Jul 2013 07:49:43 +0000 (10:49 +0300)] 
Reload into If-None-Match

This patch sends an If-None-Match  request, when we need to re-validate
if a cached object which has a strong ETag is still valid.

This is also done in the cases an HTTP client request contains HTTP
headers prohibiting a from-cache response (i.e., a "reload" request).
The use of If-None-Match request in this context violates RFC 2616 and
requires using reload-into-ims option within refresh_pattern squid.conf
directive.

The exact definition of a "reload request" and the adjustment/removal of
"reload" headers is the same as currently used for reload-into-ims
option support. This patch is not modifying that code/logic, just adding
an If-None-Match header in addition to the IMS header that Squid already
adds.

This is a Measurement Factory Project

12 years agoFix stupid typo in rev.12941
Amos Jeffries [Sun, 14 Jul 2013 03:45:23 +0000 (21:45 -0600)] 
Fix stupid typo in rev.12941

12 years agoFix external ACL user:pass detail logging after adaptation
Nathan Hoad [Sun, 14 Jul 2013 03:03:53 +0000 (21:03 -0600)] 
Fix external ACL user:pass detail logging after adaptation

When a request is successfully adapted, the external ACL username and
password are now inherited with this patch. This means the
LFT_USER_NAME log token can display the username from an external ACL
if available, for adapted requests.

The HttpRequest will inherit the password for good measure as well -
while none too useful, it seems strange to inherit the username but
not the password.

12 years agoFix assert() with side effects
Amos Jeffries [Sun, 14 Jul 2013 03:00:32 +0000 (21:00 -0600)] 
Fix assert() with side effects

assert() may be completely removed by precompiler when optimizing. Such
that the code conditional never gets run.

12 years agoPrep for 3.3.8 and 3.2.13
Amos Jeffries [Sat, 13 Jul 2013 13:08:28 +0000 (07:08 -0600)] 
Prep for 3.3.8 and 3.2.13

12 years agoBetter handling of strange port values in Host:
Amos Jeffries [Sat, 13 Jul 2013 12:19:45 +0000 (00:19 +1200)] 
Better handling of strange port values in Host:

We can do better than just producing errors about invalid port details
and treatign it as port-0.
We can instead undo the port separation and pass it through as part of
the host name to be verified with the default port number properly
assumed.

12 years agoBug 3869: assertion failed: MemBuf.cc:272: size < capacity
Amos Jeffries [Fri, 12 Jul 2013 16:08:09 +0000 (10:08 -0600)] 
Bug 3869: assertion failed: MemBuf.cc:272: size < capacity

12 years agoPrep for 3.2.12 and 3.3.7
Amos Jeffries [Thu, 11 Jul 2013 04:38:47 +0000 (22:38 -0600)] 
Prep for 3.2.12 and 3.3.7

12 years agoProtect against buffer overrun in DNS query generation
Nathan Hoad [Wed, 10 Jul 2013 12:38:36 +0000 (06:38 -0600)] 
Protect against buffer overrun in DNS query generation

see SQUID-2013:2.

This bug has been present as long as the internal DNS component however
most code reaching this point is passing through URL validation first.
With Squid-3.2 Host header verification using DNS directly we may have
problems.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 10 Jul 2013 00:13:08 +0000 (18:13 -0600)] 
SourceFormat Enforcement

12 years agoRelease Notes: more 3.4 documentation
Amos Jeffries [Tue, 9 Jul 2013 13:29:05 +0000 (07:29 -0600)] 
Release Notes: more 3.4 documentation