]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: remove fallback to SSL session private cache if lock init fails.
authorEmeric Brun <ebrun@exceliance.fr>
Fri, 9 May 2014 12:01:48 +0000 (14:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 May 2014 17:16:13 +0000 (19:16 +0200)
Now, haproxy exit an error saying:
Unable to initialize the lock for the shared SSL session cache. You can retry using
the global statement 'tune.ssl.force-private-cache' but it could increase the CPU
usage due to renegotiation if nbproc > 1.

src/cfgparse.c

index 60674092f9cf243c6f1cc752745c93300de45ce1..90825c0679f5e62d1f5f176233799d7150077485 100644 (file)
@@ -6765,16 +6765,12 @@ out_uri_auth_compat:
 
                        alloc_ctx = shared_context_init(global.tune.sslcachesize, (!global.tune.sslprivatecache && (global.nbproc > 1)) ? 1 : 0);
                        if (alloc_ctx < 0) {
-                               if (alloc_ctx == SHCTX_E_INIT_LOCK) {
-                                       Warning("Unable to init lock for the shared SSL session cache. Falling back to private cache.\n");
-                                       alloc_ctx = shared_context_init(global.tune.sslcachesize, 0);
-                               }
-
-                               if (alloc_ctx < 0) {
+                               if (alloc_ctx == SHCTX_E_INIT_LOCK)
+                                       Alert("Unable to initialize the lock for the shared SSL session cache. You can retry using the global statement 'tune.ssl.force-private-cache' but it could increase CPU usage due to renegotiations if nbproc > 1.\n");
+                               else
                                        Alert("Unable to allocate SSL session cache.\n");
-                                       cfgerr++;
-                                       continue;
-                               }
+                               cfgerr++;
+                               continue;
                        }
 
                        /* initialize all certificate contexts */