]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker/ocsp: skip ocsp-update proxy init in master
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2024 10:23:13 +0000 (12:23 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2024 10:30:59 +0000 (12:30 +0200)
The proxy must be created in mworker mode, but only in the worker, not in
the master. The current code creates the proxy in both processes.

The patch only checks that we are not in the master to start the
ocsp-update pre-check.

No backport needed.

src/ssl_ocsp.c

index 19bb92ac361a44506d17b0f2c443ca160db1cfa1..323c32e19df586978f417de684b4abf867b61439 100644 (file)
@@ -1388,6 +1388,11 @@ http_error:
  */
 static int ssl_ocsp_update_precheck()
 {
+
+       /* the ocsp-update is not usable in the master process */
+       if (master)
+               return ERR_NONE;
+
        /* initialize the OCSP update dedicated httpclient */
        httpclient_ocsp_update_px = httpclient_create_proxy("<OCSP-UPDATE>");
        if (!httpclient_ocsp_update_px)