]> git.kaiwu.me - haproxy.git/commit
CLEANUP: cfgparse-global: move the process-wide limits to a single parser
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2026 14:35:28 +0000 (16:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2026 07:31:07 +0000 (09:31 +0200)
commitf02d6a838b60f651eb2ac49b0c966d045d335fee
tree26fdbd614f3b31dc68c7dc0abe1e25798221d755
parentd8efc7c92509252d15ef2ae68012c3c305d91764
CLEANUP: cfgparse-global: move the process-wide limits to a single parser

"maxconn", "maxconnrate", "maxpipes", "maxsessrate", "maxsslrate",
"fd-hard-limit" and "ulimit-n" all take a single integer argument, may
only be specified once and simply assign a field in the global struct,
so they were moved together to a new cfg_parse_global_limits() function
and registered in cfg_kws so as to become discoverable via "-dKcfg".

The arguments are now checked before the value is assigned rather than
after. The two non-fatal alerts ("already specified" and "maxconn too high")
are emitted directly via ha_warning() / ha_alert(). (Same as for previous
patch, "already specified" turned to a warning) since more appropriate.
src/cfgparse-global.c