]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 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

11 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'

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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

11 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

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

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

11 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

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

11 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

11 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.

11 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

11 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

11 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.

11 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

11 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

11 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

11 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

11 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.

11 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.

11 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"

11 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

11 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

11 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.

11 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

11 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.

11 years agoBug 3960: Dead Peers Are Not Revived
Amos Jeffries [Tue, 19 Nov 2013 22:50:29 +0000 (15:50 -0700)] 
Bug 3960: Dead Peers Are Not Revived

11 years agoWindows: Fix aclocal "is already registered" errors
Amos Jeffries [Tue, 19 Nov 2013 22:49:14 +0000 (15:49 -0700)] 
Windows: Fix aclocal "is already registered" errors

aclocal on Windows cannot handle line-wrapping \ characters and leaves
them present in the output m4 code. in side AC_CONFIG_FILES macro this
results in a mystery file '\\r' being 'registered'.

The list of Makefiles does not even need ths line-wrap indicator as
demonstrated by the tools/Makefile missing its one for some time without
problems.

 This is an iCelero Inc sponsored fix.

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.