MINOR: proxy: add PR_FL_CHECKED flag

PR_FL_CHECKED is set on proxy once the proxy configuration was fully
checked (including postparsing checks).

This information may be useful to functions that need to know if some
config-related proxy properties are likely to change or not due to parsing
or postparsing/check logics. Also, during runtime, except for some rare cases
config-related proxy properties are not supposed to be changed.
This commit is contained in:
Aurelien DARRAGON 2024-03-09 22:18:51 +01:00
parent 6810c41f8e
commit 56d8074798
2 changed files with 2 additions and 0 deletions

View File

@ -214,6 +214,7 @@ enum PR_SRV_STATE_FILE {
#define PR_FL_EXPLICIT_REF 0x08 /* The default proxy is explicitly referenced by another proxy */
#define PR_FL_IMPLICIT_REF 0x10 /* The default proxy is implicitly referenced by another proxy */
#define PR_FL_PAUSED 0x20 /* The proxy was paused at run time (reversible) */
#define PR_FL_CHECKED 0x40 /* The proxy configuration was fully checked (including postparsing checks) */
struct stream;

View File

@ -2338,6 +2338,7 @@ static void init(int argc, char **argv)
}
list_for_each_entry(ppcf, &post_proxy_check_list, list)
err_code |= ppcf->fct(px);
px->flags |= PR_FL_CHECKED;
}
if (err_code & (ERR_ABORT|ERR_FATAL)) {
ha_alert("Fatal errors found in configuration.\n");