]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: ssl: Forbid using ssl-mode-async with per tgroup fd tables
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 19 Aug 2026 14:09:41 +0000 (16:09 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 19 Aug 2026 14:27:42 +0000 (16:27 +0200)
ssl-mode-async requires file descriptors global to the process, which is
not true with tune.fd.tables per-thread-group, so just forbid it.

src/cfgparse-ssl.c

index 9bf23cf4db7a0a53ae63ad4cb167bcc5aa2c5f87..08a9ade9e64cba3e241a3392e1541bf6448cd069 100644 (file)
@@ -2675,6 +2675,21 @@ end:
 REGISTER_CONFIG_POST_SECTION("listen",   post_section_frontend_crt_init);
 REGISTER_CONFIG_POST_SECTION("frontend", post_section_frontend_crt_init);
 
+static int cfgparse_ssl_post_check(void)
+{
+       int err_code = 0;
+
+       if (global_ssl.async && (global.tune.options & GTUNE_NO_TG_FD_SHARING) &&
+           (global.nbtgroups > 1)) {
+               err_code |= ERR_FATAL | ERR_ALERT;
+               ha_alert("tune.fd.tables per-thread-group is incompatible with ssl-mode-async\n");
+               goto out;
+       }
+out:
+       return err_code;
+}
+
+REGISTER_POST_CHECK(cfgparse_ssl_post_check);
 
 /* Note: must not be declared <const> as its list will be overwritten.
  * Please take care of keeping this list alphabetically sorted, doing so helps