]> git.kaiwu.me - haproxy.git/commit
MEDIUM: cfgparse-listen: move removed keywords' help messages into an array
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2026 15:50:23 +0000 (17:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2026 07:31:07 +0000 (09:31 +0200)
commitd0956635a6f479020928919ee9e65bb8813aad1b
treea29f7540f4d796c40d99912c80d8fb295e0c46ba
parentff391a74619e2311b93730197223515ddda39dfe
MEDIUM: cfgparse-listen: move removed keywords' help messages into an array

The 29 remaining removed keywords are almost all handled the same way:
  - the version where the keyword was removed is reported (except for
    "bind-process")
  - a help message is almost always provided

Instead of writing lots of code that is not always consistent, better
place these keywords in an array with their version and help messages,
leaving NULL for the missing info. For "bind-process", the relevant
version was updated (2.7).

The proxy_parse_removed_kw() parser was extended to consult this table,
and the keywords only had to be added to the standard parser, pointing
to this function as their parser. This way, the same output messages as
before are emitted with much less code and even less risks of errors.

The list of converted keywords is:

  appsession, bind-process, block, cliexp, grace, redisp, redispatch,
  reqadd, reqallow, reqdel, reqdeny, reqiallow, reqidel, reqideny,
  reqipass, reqirep, reqitarpit, reqpass, reqrep, reqtarpit, rspadd,
  rspdel, rspdeny, rspidel, rspideny, rspirep, rsprep, srvexp,
  transparent,
src/cfgparse-listen.c