]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoFix GCC 4.6 unused variables in test-suite
Amos Jeffries [Thu, 21 Jul 2011 05:23:16 +0000 (17:23 +1200)] 
Fix GCC 4.6 unused variables in test-suite

14 years agoBug 3273: assertion comm.cc:775: Comm::IsConnOpen(conn)
Christos Tsantilas [Thu, 21 Jul 2011 05:07:42 +0000 (17:07 +1200)] 
Bug 3273: assertion comm.cc:775: Comm::IsConnOpen(conn)

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 21 Jul 2011 00:12:33 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoAuthor: Christos Tsantilas <chtsanti@users.sourceforge.net>, Amos Jeffries <squid3...
Christos Tsantilas [Wed, 20 Jul 2011 12:38:39 +0000 (15:38 +0300)] 
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>, Amos Jeffries <squid3@treenet.co.nz>
Bug 3264: Segmentation Fault in src/ipc/Strand.cc(54) receive: 3

The SharedListenResponse because copied using memcpy function (TypedMsgHdr.cc
file, 154 line, Ipc::TypedMsgHdr::getRaw method) can not have complex class
members like the SharedListenResponse::conn which is a RefCounted object.

This patch
 - Remove the SharedListenResponse::conn member and replaced with a
   single SharedListenResponse::fd (integer filedescriptor) member.

 - Does not create a new Comm::Connection object for listening sockets
   inside IPC code , but use the Comm:Connection object created while
   initializing the listening socket and passed to the Ipc::StartListening
   method.

14 years agoBug 3248: login=NEGOTIATE sends wrong auth header to origin peers
Pierre LALET [Wed, 20 Jul 2011 11:01:24 +0000 (23:01 +1200)] 
Bug 3248: login=NEGOTIATE sends wrong auth header to origin peers

14 years agoFix tab indent on ipc/Makefile
Amos Jeffries [Wed, 20 Jul 2011 09:24:15 +0000 (21:24 +1200)] 
Fix tab indent on ipc/Makefile

14 years agoBug 1842: Optimize order of tests in peerWouldBePinged() and peerHTTPOkay()
Jean-Gabriel Dick [Wed, 20 Jul 2011 07:35:53 +0000 (19:35 +1200)] 
Bug 1842: Optimize order of tests in peerWouldBePinged() and peerHTTPOkay()

The peerAllowedToUse() function may be time consuming, especially on sites that
have lots of acls.

14 years agoBug 2051: 'default' cache_peer option does not match documentation
Amos Jeffries [Wed, 20 Jul 2011 07:04:54 +0000 (19:04 +1200)] 
Bug 2051: 'default' cache_peer option does not match documentation

Move the default parent to second-lowest priority on the parent
selection. This also allows the other more delicate balancing
algorithms to work properly with a default configured.

sourcehash and userhash are reversed in priority to simplify the
selection code around #if..#endif once default is moved.

Also, getAnyParent() is dropped. It is redundant with the FIRSTUP
 algorithm.

14 years agoLanguage: de updates
Robert [Tue, 19 Jul 2011 12:01:19 +0000 (00:01 +1200)] 
Language: de updates

14 years agoBug 3280: allow max-size unset and min-size=N to be true for large objects
Amos Jeffries [Mon, 18 Jul 2011 22:43:59 +0000 (10:43 +1200)] 
Bug 3280: allow max-size unset and min-size=N to be true for large objects

14 years agoBug 3267: workers IPC mount points disobey --localstatedir
Amos Jeffries [Mon, 18 Jul 2011 12:04:19 +0000 (00:04 +1200)] 
Bug 3267: workers IPC mount points disobey --localstatedir

14 years agoAcess Control API cleanup
Amos Jeffries [Sat, 16 Jul 2011 15:21:48 +0000 (03:21 +1200)] 
Acess Control API cleanup

In summary:
 * use nonBlockingCheck() or fastCheck() to test ACLs.
 * be prepared to handle any allow_t in the result.

ACL testing functions publicly available from ACLChecklist are:

 - nonBlockingCheck (public), fastCheck public), check (public but not to be used)
 - matchAclListFast (public), matchAclListSlow (private), matchAclList (private).

Given that there are only two types of test performed, this array of API
methods has been causing confusion and mistakes for some developers.

This patch seeks to clarify that API by correcting a flaw in the naming
of check() and matchAclListFast().

Due to "Fast" ACLs coming in two types there are two overloaded
fastCheck() functions. Now with identical output behaviour. Both return
the allow_t result of the lookup. This is expected to _usually_ be
ACCESS_ALLOWED / ACCESS_DENIED but that is not always the case.
Callers need to be written with consideration that the set of enum
results may change.

 - fastCheck(), no parameters, when a full set of "Fast" *_access lines
   are to be scanned. The checklist constructor accepts the list to be
   scanned. This is the old fastCheck(), with the new ALLOWED / DENIED
   / DUNNO result.

 - fastCheck(list), one parameter, when a single-line set of ACLs is to
   be scanned. This is the old matchAclListFast(), with the new ALLOWED
   / DENIED / DUNNO result. Will return ALLOWED whenever the whole set
   of ACLs matches. Other results may vary.

 - nonBlockingCheck() - for "Slow" non-blocking lookups with asynchronous
   callback handler. NP: not touched by this patch.

The output change from boolean to allow_t is due to the fastCheck()
callers mixed set of needs allow/deny/other which boolean cannot meet.
Mapping that tri-state need to a boolean result has led to inconsistent
cases of fastCheck() producing unusual values for "true". Sometimes
wrongly for the caller.

Added result lookup type ACCESS_DUNNO, to indicate a test was unable to
be completed BUT there was no allow/deny/auth-required resulting.

Alters all previous calling code to use the new fastCheck() API output.
Some have been polished up to boolean where appropriate instead of
relying on integer values.

Removes matchAclListFast/matchAclListSlow,
Renames check() to matchNonBlocking;
   all match*() functions are internal operations during ACL testing.

14 years agoAllow MemPool late nitialization
Amos Jeffries [Sat, 16 Jul 2011 04:00:55 +0000 (16:00 +1200)] 
Allow MemPool late nitialization

FQDN had memDataInit() in its component setup, which movedin rev 11499.
The assert is in memCheckInit() and tests that memInit() worked properly.
But if a pool is initialized only when its component is loaded, that
check will fail on several conditions unrelated to the operation of
memory. Seemingly trivial changes to component loading order is one case.

This patch allows modules to initialize/register their own pools on
demand later in the startup process.

* shuffle MEM_DONTFREE which is an existing fixed entry that must not be
  memInitCheck()'d to the end of the MemPool type enum list.

* update memCheckInit() to stop scanning for missing pools at that marker.

* shuffle pool types which are initialized by their components after the
 marker value. Such that no false problem is reported if (a) the
  component is never initialized for that worker, or (b) the component is
  only initialized during the configuration process.

* document this layout significance in the enum list to aid future pool
  additions or moves.

* add asserts to memAllocate() and memFree() to highlight the cases of
  brokenness memCheckInit() was catching. Using assert() instead of if()
  so that optimized builds can avoid the penalty of an extra test on each
  alloc/free.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 16 Jul 2011 00:12:39 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoBug 3246: assertion client_side.cc:1407 connIsUsable(http->getConn())
Christos Tsantilas [Fri, 15 Jul 2011 13:20:26 +0000 (07:20 -0600)] 
Bug 3246: assertion client_side.cc:1407 connIsUsable(http->getConn())

14 years agoBug 3269: cache.log applyQueryParams messages
Amos Jeffries [Fri, 15 Jul 2011 12:52:41 +0000 (00:52 +1200)] 
Bug 3269: cache.log applyQueryParams messages

14 years agoext_kerberos_ldap_group_acl: drop unused variables in SASL support for GCC 4.6
Amos Jeffries [Fri, 15 Jul 2011 05:30:39 +0000 (17:30 +1200)] 
ext_kerberos_ldap_group_acl: drop unused variables in SASL support for GCC 4.6

14 years agoRelease Notes: document CacheManager and eCAP changes
Amos Jeffries [Fri, 15 Jul 2011 03:50:18 +0000 (15:50 +1200)] 
Release Notes: document CacheManager and eCAP changes

14 years agoUse forward-proxy port for internal URLs.
Amos Jeffries [Fri, 15 Jul 2011 03:30:16 +0000 (15:30 +1200)] 
Use forward-proxy port for internal URLs.

Alter the getMyPort() function to skip ports flagged for special mode
handling (intercept, tproxy, accel) when generating internal URLs.

This allows us to lock down security on these special mode ports and
still have an optional position for the forward-proxy port. Prior to
this only the first port was used, forcing an unnecessary configuration
order.

Since it is now possible to have no port available for these URLs the
fatal()/crash has been reduced to an annoying cache.log message. Port 0
will be inserted into the URLs making them invalid.

For now this is only done on http_port entries. https_port has an
incomplete merge of https_port_list/http_port_list which needs to be
completed before it is easily done there.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 15 Jul 2011 00:12:40 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoBug 3274: assertion failed: CommCalls.h:144: "dp"
Christos Tsantilas [Thu, 14 Jul 2011 09:09:25 +0000 (12:09 +0300)] 
Bug 3274: assertion failed: CommCalls.h:144: "dp"

The  ConnOpener::earlyAbort method shopuld defined as comm close handler
which means that it should have as argument CommCloseCbParams not
CommConnectCbParams

14 years agoPort 2.7: act-as-origin for reverse proxy ports
Amos Jeffries [Thu, 14 Jul 2011 08:59:10 +0000 (02:59 -0600)] 
Port 2.7: act-as-origin for reverse proxy ports

14 years agoAuthor: Amos Jeffries <squid3@treenet.co.nz>, Christos Tsantilas <chtsanti@users...
Christos Tsantilas [Tue, 12 Jul 2011 19:02:48 +0000 (22:02 +0300)] 
Author: Amos Jeffries <squid3@treenet.co.nz>, Christos Tsantilas <chtsanti@users.sourceforge.net>
Add DNS lookup step to ICAP connect

This patch add an async DNS lookup step to the ICAP connection setup process.
As a side effect it adds a little bit of tcp_outgoing_address support to ICAP.
Its limited to "dst" ACL at present. So outgoing ACL selections depending on
HTTP request details wont work. Which makes sense since this connection may
be reused for multiple requests.

More than one IP result are not used  since there seems to be no sane place
to store multiple IPs between connect attempts. It currently relies on ipcache
MarkGood/MarkBad keeping a good usable IP at the top of the IP set.

This patch also try to make Max-Connections ICAP feature cooperate well with
the new DNS lookup code

14 years agoBug 3195: kerberos_ldap_group will not build without kerberos
Markus Moeller [Tue, 12 Jul 2011 05:54:58 +0000 (23:54 -0600)] 
Bug 3195: kerberos_ldap_group will not build without kerberos

cleans up include file which does not require any gssapi headers and
checks for kerberos availability.

14 years agoRemove redundant config.h includes
Amos Jeffries [Tue, 12 Jul 2011 05:52:07 +0000 (23:52 -0600)] 
Remove redundant config.h includes

14 years agokerberos_lap_group: several fixes
Markus Moeller [Tue, 12 Jul 2011 05:47:25 +0000 (23:47 -0600)] 
kerberos_lap_group: several fixes

* detect SASL2 libraries on 64-bit RPM and BSD systems
* parse for -S command line option properly
* debug and process NULL domains better

14 years agoAdd more debugging to tunnel.cc
Amos Jeffries [Mon, 11 Jul 2011 08:28:29 +0000 (02:28 -0600)] 
Add more debugging to tunnel.cc

No logic changes. just cache.log output display for some more events.

14 years agoBug 2495: ignore whitespace prefix on config lines
Amos Jeffries [Sun, 10 Jul 2011 21:42:02 +0000 (09:42 +1200)] 
Bug 2495: ignore whitespace prefix on config lines

Allow whitespace indentation before any lines. Making SMP and comment
configuration easier to read for some.

14 years agoPermit simple HTTP version debug logging
Amos Jeffries [Fri, 8 Jul 2011 06:01:48 +0000 (00:01 -0600)] 
Permit simple HTTP version debug logging

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 8 Jul 2011 00:12:40 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoBug fixes: Multiple bugs in IdleConnList part3
Christos Tsantilas [Thu, 7 Jul 2011 19:08:17 +0000 (22:08 +0300)] 
Bug fixes: Multiple bugs in IdleConnList part3

- fix the IdleConnList::closeN to correctly close N connection objects

PS. what an exercise!

14 years agoBug 3222: cache_peer name is not logging on CONNECT
Amos Jeffries [Thu, 7 Jul 2011 11:48:08 +0000 (23:48 +1200)] 
Bug 3222: cache_peer name is not logging on CONNECT

14 years agoBug fixes: Multiple bugs in IdleConnList part2
Christos Tsantilas [Thu, 7 Jul 2011 10:13:53 +0000 (13:13 +0300)] 
Bug fixes: Multiple bugs in IdleConnList part2

commit revno:11534  fixes:
 - Inside IdleConnList::removeAt method the ellements deleted correctly from
   the theList_ array. The problem was that if parent_ exist the size of the
   array is not decreased and the last element was duplicated (the last two
   ellements pointed to the same connection object).
   The commit revno:11534 did not solve this problem and just created a
   duplicate entry in an other position.
   This patch solves the problems in IdleConnList::removeAt method.

Other:
 - Remove the fd_table[fd].flags.read_pending tests inside IdleConnList::pop
   and IdleConnList::findUsable methods. This flag currently is not fully
   implemented and used only by the ssl stuff.

 - Inside IdleConnList::closeN method in two positions we are storing the
   reference of the Comm::Connection object which will be deleted, to use it
   to clean up and close the connection later:
       const Comm::ConnectionPointer &conn = theList_[--size_];
       theList_[size_] = NULL;
   This is wrong because the second command may delete the conn object, causing
   assertion in Comm::Connection destructor, because it is still open, or
   segmentation faults when trying to use the conn object later.
   This patch replaces the pointer reference with a normal pointer.

 - Call clearHandlers inside IdleConnList::pop and IdleConnList::findUsable
   methods before return the Comm::Connection object to the user.

14 years agoLanguage: fr updates
Bernard [Thu, 7 Jul 2011 00:01:44 +0000 (12:01 +1200)] 
Language: fr updates

14 years agoprep for 3.1.14
Amos Jeffries [Mon, 4 Jul 2011 04:34:37 +0000 (22:34 -0600)] 
prep for 3.1.14

14 years agoBug 3261: Could not create a DNS socket
Amos Jeffries [Mon, 4 Jul 2011 04:28:59 +0000 (22:28 -0600)] 
Bug 3261: Could not create a DNS socket

Reverts bzr revision 11530 due to regression.

14 years agoOptimization: Swap default manager ACL order
Amos Jeffries [Mon, 4 Jul 2011 02:41:42 +0000 (20:41 -0600)] 
Optimization: Swap default manager ACL order

14 years agoBug 2862: add http(s):// support to cache manager
Amos Jeffries [Mon, 4 Jul 2011 01:48:32 +0000 (13:48 +1200)] 
Bug 2862: add http(s):// support to cache manager

via http://$visible_hostname/ requests intercepted by the internal
server feature. Also https:// if SSL/TLS is available on the receiving
port.

In order to safely identify the manager reports the path prefix
/squid-internal-mgr/ is added. The old cache_oject:// scheme format
paths follow that identifier prefix.

To retrieve pages the proxy visible_hostname, management port (first
forward-proxy port), and the path prefix must all be present in the URL.

The "manager" ACL is altered to url_regex in order to match the new
protocol+path URL syntax.

Unlike the cache_object:// scheme, http[s]:// do not accept password
as part of the URL. If one is needed it must be sent via the HTTP
Authorization: Basic authentication header.

NP: use of this per-action cachemgr_passwd is not secure and should be
avoided. Stronger security can be gained via http_access with regular
proxy_auth and other ACLs.

14 years agoRemove duplicate calls to IsAnyAddr in DNS
Amos Jeffries [Mon, 4 Jul 2011 01:25:42 +0000 (13:25 +1200)] 
Remove duplicate calls to IsAnyAddr in DNS

14 years agoBug fixes: Multiple bugs in IdleConnList
Christos Tsantilas [Fri, 1 Jul 2011 19:30:23 +0000 (22:30 +0300)] 
Bug fixes: Multiple bugs in IdleConnList

- Inside IdleConnList::removeAt method the last element of the
  IdleConnList::theList_ array initialized with random memory
- Inside IdleConnList::removeAt method if the IdleConnList::parent_ is NULL
  (ICAP connections pools) the size_ of the array is not decreased after
  element removed
- Inside IdleConnList::closeN method, it removes always all elements from the
  list except the first one

14 years agoPrep for 3.1.13
Amos Jeffries [Fri, 1 Jul 2011 02:28:38 +0000 (14:28 +1200)] 
Prep for 3.1.13

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 1 Jul 2011 00:12:34 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoRemove the HttpStateData::orig_request member
Christos Tsantilas [Thu, 30 Jun 2011 08:33:36 +0000 (11:33 +0300)] 
Remove the HttpStateData::orig_request member

When FwdServer::_peer is set, HttpStateData constructor creates a new special
HttpRequest, overwriting the request pointer set in the parent (ServerStateData)
constructor to fwd->request.

This special HttpRequest sets the proper urlpath (which maybe different from
the original HttpRequest), the host (HttpRequest::SetHost/GetHost) to be the
peer hostname and inherits flags, protocol, method. Also sets the
HttpRequest::flags.proxying.

Probably this is originaly done to handle only the differences in urlpath and
the host. But this is has  as result to have two HttpRequests object in
HttpStateData, but their difference is not clear.

This patch removes the HttpStateData::orig_request member and uses only the
HttpStateData::request member

Bugs fixed with this patch:

- Debugs() and error pages sometimes display the cache_peer hostname as the URL   requested domain name when going to an origin. Regardless of what the virtual
  host name actually is.

- The request_header_access configuration parameter does not work when
  sending requests to parent proxies.

- Squid may cache replies to requests with no-store in headers when uses a
  parent cache.

- parent caches which have been configured as "sibling" for specific domains
  using the neighbor_type_domain parameter are not counted.

- Probably many other

This is a Measurement Factory project

14 years agoIp::Address::IsAnyAddr did not return true in the case the ip address is an ipv4...
Christos Tsantilas [Wed, 29 Jun 2011 19:58:09 +0000 (22:58 +0300)] 
Ip::Address::IsAnyAddr did not return true in the case the ip address is an ipv4 anyaddr

14 years agoDrop duplicate code on FTP data accept
Amos Jeffries [Tue, 28 Jun 2011 01:39:23 +0000 (13:39 +1200)] 
Drop duplicate code on FTP data accept

14 years agoFix SegFault on CONNECT with log_ip_on_direct
Amos Jeffries [Fri, 24 Jun 2011 05:07:06 +0000 (17:07 +1200)] 
Fix SegFault on CONNECT with log_ip_on_direct

In short we cannot update the hierarchy details when the FD is invalid.
Push the comm error handling up above delay and hierarchy logics.

14 years agoBug 3247: Domain from URL Stripped when going through peers
Amos Jeffries [Fri, 24 Jun 2011 04:05:33 +0000 (16:05 +1200)] 
Bug 3247: Domain from URL Stripped when going through peers

Also, extra debug details on peer select routing choices

14 years agoWARNING! missing imporant field for detail error: SQUID_X509_V_ERR_DOMAIN_MISMATCH
Amos Jeffries [Fri, 24 Jun 2011 01:29:53 +0000 (13:29 +1200)] 
WARNING! missing imporant field for detail error: SQUID_X509_V_ERR_DOMAIN_MISMATCH

Missing quotes in SSL template addition of revno.11515

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 24 Jun 2011 00:12:50 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoRemoved pointless call to maybeReadVirginBody() for aborted entries.
Alex Rousskov [Thu, 23 Jun 2011 21:03:57 +0000 (15:03 -0600)] 
Removed pointless call to maybeReadVirginBody() for aborted entries.
No runtime changes expected.

Setting flags.do_next_read to zero and then calling maybeReadVirginBody() is
pointless because maybeReadVirginBody() does nothing but wasting cycles when
the flag is zero. Also, even if we do manage to read the virgin response body
somehow, we cannot write it to the aborted store entry anyway.

14 years agoBug 3239: Rename myip/myport as localip/localport - Fix initial patch
Christos Tsantilas [Thu, 23 Jun 2011 09:51:08 +0000 (12:51 +0300)] 
Bug 3239: Rename myip/myport as localip/localport - Fix initial patch

A misstyped  if(strcmp ...) statemets has as result, all acl type in squid.conf
to be considered as "localip" acl type.

14 years agoReverse revno.11514. Not good enough
Amos Jeffries [Thu, 23 Jun 2011 08:33:13 +0000 (02:33 -0600)] 
Reverse revno.11514. Not good enough

14 years agoSourceLayout: ETag and TimeOrTag in their own headers
Amos Jeffries [Thu, 23 Jun 2011 08:31:56 +0000 (02:31 -0600)] 
SourceLayout: ETag and TimeOrTag in their own headers

14 years agoDocumentation: tcp_outgoing_address changed in 3.2.0.9
Amos Jeffries [Thu, 23 Jun 2011 02:13:19 +0000 (20:13 -0600)] 
Documentation: tcp_outgoing_address changed in 3.2.0.9

14 years agoUpdate ssl_crtd to use 'OK' status inline with other helpers
Amos Jeffries [Thu, 23 Jun 2011 00:44:34 +0000 (18:44 -0600)] 
Update ssl_crtd to use 'OK' status inline with other helpers

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 23 Jun 2011 00:23:48 +0000 (18:23 -0600)] 
SourceFormat Enforcement

14 years agoAdd man(8) file for ssl_crtd
Amos Jeffries [Thu, 23 Jun 2011 00:03:25 +0000 (18:03 -0600)] 
Add man(8) file for ssl_crtd

14 years agoFix BSD build issues
Amos Jeffries [Wed, 22 Jun 2011 11:57:59 +0000 (05:57 -0600)] 
Fix BSD build issues

14 years agoPolish SSL certificate error handling
Christos Tsantilas [Wed, 22 Jun 2011 08:54:17 +0000 (11:54 +0300)] 
Polish SSL certificate error handling

This patch
- Adds SQUID_X509_V_ERR_DOMAIN_MISMATCH to TheSslErrorArray and in
  errors/templates/error-details.txt template file to enable bypass and
  details reporting for that error.

- Fixes the ssl error details handling code, to report the first honored error
  in a certificate, not the first certification validation error (which could
  have been bypassed).

- Adjust ssl_verify_cb() to copy ctx->error to error_no in the beginning and
  never use ctx->error after that.

14 years agoBug 3243: CVE-2009-0801 Bypass of browser same-origin access control
Amos Jeffries [Wed, 22 Jun 2011 06:36:41 +0000 (18:36 +1200)] 
Bug 3243: CVE-2009-0801 Bypass of browser same-origin access control

... in intercepted communications.

14 years agoBug 3245: reconfigure: assertion failed: mem.cc:190: "MemPools[type] == NULL"
Amos Jeffries [Wed, 22 Jun 2011 05:44:50 +0000 (17:44 +1200)] 
Bug 3245: reconfigure: assertion failed: mem.cc:190: "MemPools[type] == NULL"

Make memDataInit() handle repeated calls.

It still implicitly relies on Mem::Init() being called beforehand.

14 years agoFix mk-error-details-po.pl output msgstr
Amos Jeffries [Wed, 22 Jun 2011 04:05:34 +0000 (16:05 +1200)] 
Fix mk-error-details-po.pl output msgstr

msgstr needs to be empty in the template .PO/.POT.
It only contains values when translated.

TODO: filter the .po which are now being distributed with English texts
      in their msgstr.

14 years agoMore compile fixes for revo.11508
Amos Jeffries [Mon, 20 Jun 2011 13:42:38 +0000 (01:42 +1200)] 
More compile fixes for revo.11508

14 years agoCompile issues in revno.11508
Amos Jeffries [Mon, 20 Jun 2011 11:24:11 +0000 (23:24 +1200)] 
Compile issues in revno.11508

14 years agoReduce debug level on forwarding start message
Amos Jeffries [Mon, 20 Jun 2011 09:13:51 +0000 (21:13 +1200)] 
Reduce debug level on forwarding start message

14 years agoBug 3239: Rename myip/myport as localip/localport
Amos Jeffries [Mon, 20 Jun 2011 08:51:32 +0000 (20:51 +1200)] 
Bug 3239: Rename myip/myport as localip/localport

There is no actual logic change to this patch.

 * Document what the myip/myport actually match and use the clearer
   names of localip / localport.

 * Cleanly upgrade the ACL types when old versions are seen.

 * Rename all relevant code symbols to match the new names.

14 years agoBug 3244: wrong port for peer relayed requests
Amos Jeffries [Mon, 20 Jun 2011 07:50:09 +0000 (19:50 +1200)] 
Bug 3244: wrong port for peer relayed requests

14 years agoDebug display of peer selection choices
Amos Jeffries [Sun, 19 Jun 2011 13:52:55 +0000 (07:52 -0600)] 
Debug display of peer selection choices

14 years agoFix broken --disable-ipv6
Amos Jeffries [Sun, 19 Jun 2011 13:49:39 +0000 (07:49 -0600)] 
Fix broken --disable-ipv6

Broken in the 3.1->3.2 autoconf naming convention update.

14 years agoPrep for 3.2.0.9 and 3.1.12.3
Amos Jeffries [Sat, 18 Jun 2011 07:05:06 +0000 (19:05 +1200)] 
Prep for 3.2.0.9 and 3.1.12.3

14 years agoTranslation: POT update after SSL changes
Amos Jeffries [Sat, 18 Jun 2011 06:30:27 +0000 (18:30 +1200)] 
Translation: POT update after SSL changes

14 years agoICC compatibility: remove const on Comm::Connection::getPeer()
Amos Jeffries [Sat, 18 Jun 2011 05:26:09 +0000 (17:26 +1200)] 
ICC compatibility: remove const on Comm::Connection::getPeer()

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 18 Jun 2011 00:12:51 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years ago1st try to fix "make check" linking errors after "Configurable SSL error details...
Christos Tsantilas [Fri, 17 Jun 2011 18:57:21 +0000 (21:57 +0300)] 
1st try to fix "make check" linking errors after "Configurable SSL error details messages" patch

The make check fails on 3.HEAD-amd64-CentOS-5.3 platform

14 years agoUpgrade comm layer Connection handling
Amos Jeffries [Fri, 17 Jun 2011 16:32:04 +0000 (04:32 +1200)] 
Upgrade comm layer Connection handling

The premise underlying this large patch is that instead of copying and
re-copying and re-lookups for the FD related data we can take the
ConnectionDetail class which is generated to store a few bits of IP
information about newly accept()'d connections and make it persist across
the whole of Squid.

It has been renamed from ConnectionDetails to Comm::Connection and has
absorbed a few FD data fields from other classes long the code paths.
Its scope is to hold an FD (or potential FD) plus meta data.

Comm::Connection are valid before, during and after the period when their
particular FD is open. The meta data may be used beforehand to setup the
FD (in the case of peer selection or other TcpAcceptor usage), and it may
remain in use after FD closure until logging or all linked job and call
objects have detected the closure and terminated. A global function
Comm::IsConnOpen() may be used on the pointer objects to detect whether
they point at an active connection.

Most of the patch is simple parameter changes to functions and methods to
pass a "cont Comm::ConnectionPointer &" instead of an "int FD". Along with
class FD fields being converted to these object pointers.

In order to support this alteration there have been behavioral changes to:

The socket accept() Job
  Comm::TcpAcceptor altered to spawn Comm::Connection objects and to
  operate with one controlling their active/closed state.

FTP data channel handling Calls.
  efficiency improvements making use of Comm::Connection as a feedback
  channel between TcpAcceptor and FtpStateData to cancel the listening
  Job. Most of the underlying logic change is already in trunk to use
  the Subscription API. This just streamlines and fixes some race bugs.

Peer selection
  updated to spawn a set of Comm::Connection objects. To do this it is
  updated to determine *all* peers including DIRECT ones. Doing the DNS
  lookup instead of leaving it to comm_connect() on the other side of
  FwdState. It also absorbs the outgoing address selection from FwdState
  and can now specify details of local+remote ends of an outgoing TCP link.

Forwarding
  updated to handle the new outputs from peer selection and to open sequentially.

pconn handling
  updated to use destination IP/port and hold a Comm::Connection instead
  of domain name indexing an FD. This allows us to maintain idle pools
  and re-use FD more efficiently with virtual-hosted servers. Along
  with maintaining certainty that the pconn selected actually goes to
  the exact destination IP:port needed by forwarding.

comm layer outgoing connections
  now have a control job Comm::ConnOpener to do this. Due to the peer
  selection and forwarding changes this is a much simpler operation.

HTTP / CONNECT tunnel / gopher / whois / FTP
  updated to receive a server and client Comm::Connection object from
  forwarding. To operate on those until they close or are finished with.

SNMP / ICP / HTCP / DNS port listeners
  updated to work with Comm::Connection holding their listening socket
  meta data. This is a side-effect of the ICP and Comm read/write/timeout
  changes.

14 years ago"Configurable SSL error details messages" patch fix
Christos Tsantilas [Fri, 17 Jun 2011 15:47:14 +0000 (18:47 +0300)] 
"Configurable SSL error details messages" patch fix

Use "#if USE_ERR_LOCALES" to force TemplateFile::loadFor return false
when the USE_ERR_LOCALES is not defined, and allow compile in this case

14 years ago"Configurable SSL error details messages" patch fix
Christos Tsantilas [Fri, 17 Jun 2011 13:56:33 +0000 (16:56 +0300)] 
"Configurable SSL error details messages" patch fix

Use "#ifdef USE_SSL" for ssl related stuff to allow compile when SSL is
disabled

14 years agoLibrary fixes in testUfs
Amos Jeffries [Fri, 17 Jun 2011 12:34:42 +0000 (00:34 +1200)] 
Library fixes in testUfs

14 years agoConnection opening is done by Comm::ConnOpener
Amos Jeffries [Fri, 17 Jun 2011 10:41:10 +0000 (22:41 +1200)] 
Connection opening is done by Comm::ConnOpener

14 years agoConfigurable SSL error details messages
Christos Tsantilas [Fri, 17 Jun 2011 07:46:48 +0000 (10:46 +0300)] 
Configurable SSL error details messages

This project adds support for a translatable and customisable error detail file
(errors/templates/error_details.txt). The file is stored like we store error
page templates today. Inside the file, an HTTP-like format used that can be
later extended to other error details (and beyond):

name: value
details: "value"
descr: "value"

or

name: value
details: "multi
     line
     value"
descr: "value with a \"quoted string\" inside"

The code supports future translations, just like Squid already support error
page translations.

This is a Measurement Factory project
----

Some Technical details:
 - The errorpage code which is related to loading and parsing error templates
   moved to TemplateFile class. This class is used as base class for
   ErrorPageFile class which used to load error page templates.
 - The HttpHeader parser used to parse error details
 - The  error details for various languages cached to memory
 - The ErrorDetailsList  used to store a list of error details for a
   language/locale
 - The ErrorDetailsManager is a class used to load and manage multiple error
   details list (ErrorDetailsList objects) for many languages. It also
   implements a simple cache.

14 years agoMerged from trunk
Amos Jeffries [Fri, 17 Jun 2011 06:04:05 +0000 (18:04 +1200)] 
Merged from trunk

14 years agoFix squidclient -V option and allow non-HTTP protocols to be tested
Amos Jeffries [Fri, 17 Jun 2011 02:31:45 +0000 (14:31 +1200)] 
Fix squidclient -V option and allow non-HTTP protocols to be tested

The "-" case is for old style HTTP (called 0.9) where there is no version
string. The "-V 0.9" is for testing servers with broken version number
tag "HTTP/0.9". Do not mix these up!

This also adds the ability to send non-HTTP version tags for testing.
 ie "-V ICAP/1.0" or "-V ICY/1.0"

14 years agoFix segfault in parse_eol()
Amos Jeffries [Fri, 17 Jun 2011 02:22:20 +0000 (14:22 +1200)] 
Fix segfault in parse_eol()

14 years agoUpgrade ICAP persistent connection handling
Amos Jeffries [Fri, 17 Jun 2011 02:14:01 +0000 (14:14 +1200)] 
Upgrade ICAP persistent connection handling

ICAP services use a "service" model of pconn different from the
"TCP destination" model which PconnPool objects are designed for.

This patch alters Adaptation::Icap::ServiceRep to use the simpler
IdleConnList object for pconn storage. IdleConnList stores a
"set of idle connections" more compatible with the ICAP model.

In order to implement ICAP max-connections feature the closeN()
operation is added to IdleConnList.

The result is removal of the complex hash and management operations on
push/pop of the idle conn set. The only expected behaviour change is
more frequent re-use of idle connections on services with multiple IP
addresses. Speed gains are minimal, but positive.

14 years agoLanguage: en updates
Amos [Thu, 16 Jun 2011 18:03:50 +0000 (06:03 +1200)] 
Language: en updates

14 years agoLanguage: en updates
Amos [Thu, 16 Jun 2011 18:02:19 +0000 (06:02 +1200)] 
Language: en updates

14 years agoLanguage: en updates
Amos [Thu, 16 Jun 2011 18:00:59 +0000 (06:00 +1200)] 
Language: en updates

14 years agoFixed bypass of SSL certificate validation errors.
Christos Tsantilas [Wed, 15 Jun 2011 08:47:09 +0000 (11:47 +0300)] 
Fixed bypass of SSL certificate validation errors.

The bypass code was calling ACLChecklist::fastCheck() multiple times
if multiple certificate errors were found. That method should not be
called multiple times because it changes the internal ACLChecklist
state, producing wrong answers for repeated calls.

This patch fixes the ACLChecklist::fastCheck() method so it can be called
multiple times. Each fastCheck() call results in an independent access
list check.

This is a Measurement Factory project

14 years agoRelease notes: wiki link updates
Amos Jeffries [Wed, 15 Jun 2011 07:39:29 +0000 (19:39 +1200)] 
Release notes: wiki link updates

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 14 Jun 2011 00:12:35 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>, Christos Tsantilas <christo...
Christos Tsantilas [Mon, 13 Jun 2011 18:04:33 +0000 (21:04 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>, Christos Tsantilas <christos@chtsanti.net>
Bug 3153 fix: Prevent ICAP RESPMOD transactions getting stuck with the adapted body.

Part 1.

Server is expected to receive adapted response headers and then consume the
adapted response body, if any. If the server receives the headers and then
aborts, it must notify the ICAP side that nobody will consume the body.
Otherwise, the ICAP transaction will fill the BodyPipe buffer and get stuck
waiting for the consumer to free some space.

Part 2:

This fix still leaves one potential race condition unhandled: The ICAP
Initiatee disappears right after sending the adapted headers to the Server
(because there is nothing else for that initiatee to do). After the
noteAdaptationAnswer() call is scheduled by ICAP and before it is received by
the Server job, there is no usable link between Server and ICAP.  There is no
way for the Server to notify the ICAP transaction that the Server job is
aborting during that time (and there is no Server job at all after it aborts,
naturally).

The solutions is to develop a custom AsyncCall which will call the
expectNoConsumption() on the message pipe if the call cannot be dialed (i.e.,
the message cannot be delivered to Server).

14 years agoAuth lookup state cbdata upgrade
Amos Jeffries [Mon, 13 Jun 2011 12:25:12 +0000 (06:25 -0600)] 
Auth lookup state cbdata upgrade

The authenticators utilize a "statedata" structure to store and pass
the callback and Auth::UserRequest an auth lookup is about.

This patch converts the structure from a CBDATA_GLOBAL_TYPE struct to a
CBDATA_CLASS2 and adds a parameterized constructor for it.

The result is that all the code using it no longer has to explicitly
manage fields assignments and cbdata referencing. Simply new the object
when submitting to the helper system and delete once its handler has
been called.

14 years agoDisplay critical WARNING: about myip/myport on interception proxies.
Amos Jeffries [Mon, 13 Jun 2011 12:22:21 +0000 (06:22 -0600)] 
Display critical WARNING: about myip/myport on interception proxies.

Advertise myportname for use instead.

14 years agoFix RADIUS helper resource leak
Amos Jeffries [Mon, 13 Jun 2011 11:49:25 +0000 (23:49 +1200)] 
Fix RADIUS helper resource leak

cppcheck detected the config file was never closed/released. This could
prevent the helper shutting down cleanly.

14 years agoFix segfault parsing digest auth realm
Amos Jeffries [Mon, 13 Jun 2011 10:32:41 +0000 (22:32 +1200)] 
Fix segfault parsing digest auth realm

Also enact a TODO about Digest::Config constructor.

14 years agoLanguage: hy updates
Arthur [Sun, 12 Jun 2011 12:01:28 +0000 (00:01 +1200)] 
Language: hy updates

14 years agoAdded more debug info to url rewriter, allowing to print the full command line sent...
Guido Serassio [Sat, 11 Jun 2011 15:04:10 +0000 (09:04 -0600)] 
Added more debug info to url rewriter, allowing to print the full command line sent to the helper

14 years agoAudit: Hide unset FD from connection log display
Amos Jeffries [Sat, 11 Jun 2011 13:54:29 +0000 (01:54 +1200)] 
Audit: Hide unset FD from connection log display

14 years agoAudit documentation fixes
Amos Jeffries [Fri, 10 Jun 2011 19:08:00 +0000 (07:08 +1200)] 
Audit documentation fixes

14 years agoFix testUfs deps for --disable-auth
Amos Jeffries [Thu, 9 Jun 2011 12:19:38 +0000 (00:19 +1200)] 
Fix testUfs deps for --disable-auth