]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse-listen: add and use cfg_parse_listen_match_option() helper
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 5 Mar 2025 19:55:41 +0000 (20:55 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 6 Mar 2025 08:30:18 +0000 (09:30 +0100)
commit0746f6bde0618ac380564fce0515f9b90b45e4b3
tree12f32bd1ea2878bf8aa914cf224e67a79d65fde5
parentd9aa1991006a6d7348e24af0ea781337d5b1c722
MINOR: cfgparse-listen: add and use cfg_parse_listen_match_option() helper

cfg_parse_listen_match_option() takes cfg_opt array as parameter, as well
current args, expected mode and cap bitfields.

It is expected to be used under cfg_parse_listen() function or similar.
Its goal is to remove code duplication around proxy->options and
proxy->options2 handling, since the same checks are performed for the
two. Also, this function could help to evaluate proxy options for
mode-specific proxies such as log-forward section for instance:
by giving the expected mode and capatiblity as input, the function
would only match compatible options.
include/haproxy/cfgparse.h
src/cfgparse-listen.c