From c0fcbe4150c7fe3dbdbe3d65b3bd9b691aef3ea2 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 3 Jun 2020 19:00:42 +0200 Subject: [PATCH] BUG/MINOR: checks: Fix test on http-check rulesets during config validity check When checking the config validity of the http-check rulesets, the test on the ruleset type is inverted. So a warning about ignored directive is emitted when the config is valid and omitted when it should be reported. No backport needed. --- src/cfgparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index 2f0688a4b..56f95581a 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2511,7 +2511,7 @@ int check_config_validity() } if ((curproxy->options2 & PR_O2_CHK_ANY) == PR_O2_TCPCHK_CHK && - (curproxy->tcpcheck_rules.flags & TCPCHK_RULES_PROTO_CHK) == TCPCHK_RULES_HTTP_CHK) { + (curproxy->tcpcheck_rules.flags & TCPCHK_RULES_PROTO_CHK) != TCPCHK_RULES_HTTP_CHK) { if (curproxy->options & PR_O_DISABLE404) { ha_warning("config : '%s' will be ignored for %s '%s' (requires 'option httpchk').\n", "disable-on-404", proxy_type_str(curproxy), curproxy->id);