]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: checks: Fix test on http-check rulesets during config validity check
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Jun 2020 17:00:42 +0000 (19:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Jun 2020 17:08:35 +0000 (19:08 +0200)
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

index 2f0688a4bc3f029cc8466a3ee65ebddba70a5e49..56f95581a52e263902b2491e0653172e63a1298d 100644 (file)
@@ -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);