]> git.ipfire.org Git - thirdparty/squid.git/commit
Avoid ssl/helper.cc "ssl_crtd" assertions on reconfiguration (#186) M-staged-PR186
authorChristos Tsantilas <christos@chtsanti.net>
Mon, 16 Apr 2018 14:46:08 +0000 (14:46 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 22 Apr 2018 16:16:15 +0000 (16:16 +0000)
commit23da195f75b394d00ddac4fa67ce6895d96292d7
tree6aca4b26b3e6deeb6bf0fe226c21b879676d15ea
parente863656d60bb8de2ea7f81e0907def276b861a97
Avoid ssl/helper.cc "ssl_crtd" assertions on reconfiguration (#186)

Reconfiguration process consists of mainReconfigureStart() and
mainReconfigureFinish() steps separated by at least one main loop
iteration. Clearing a Squid global variable in mainReconfigureStart()
creates two problems for transactions that were started before
reconfiguration:

1. Transactions accessing that global _during_ reconfiguration loop
   iteration(s) may be confused by the variable sudden disappearance.

2. Transactions accessing that global _after_ mainReconfigureFinish()
   may be confused by the variable disappearance if reconfiguration
   resulted in the global variable becoming nil.

To remove the first problem for ssl_crtd, external_acl, and redirecting
helpers, all of them are now reconfigured "instantly", during
mainReconfigureFinish().

To prevent crashes due to the second problem, Squid now generates helper
errors if the disappeared ssl_crtd or external_acl helpers are accessed
after reconfiguration. The admin is warned about such problems via
level-1 cache.log ERROR messages.

The second problem cannot be fully solved without storing (refcounted)
configuration globals inside each transaction that uses them. Such
serious changes are outside this small assertion-fixing project scope.

This is a Measurement Factory project.
src/client_side.cc
src/external_acl.cc
src/main.cc
src/redirect.cc
src/redirect.h
src/security/PeerConnector.cc
src/ssl/helper.cc
src/ssl/helper.h
src/ssl/stub_libsslutil.cc