]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcpcheck: Reject unknown keyword during parsing of healthcheck section
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Apr 2026 14:26:40 +0000 (16:26 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Apr 2026 14:31:17 +0000 (16:31 +0200)
unknown keyword was just ignored. it is not really handy to detect
error. Now an error is reported and the parsing is aborted.

src/tcpcheck.c

index 3d0ad19ffa1fe001629054e8f55fd691d5be3dd3..a53917747050fa756082332cb51b4b8ad602cf33 100644 (file)
@@ -5905,6 +5905,10 @@ int cfg_parse_healthchecks(const char *file, int linenum, char **args, int kwm)
                }
                goto out;
        }
+       else {
+               ha_alert("parsing [%s:%d] : unknown keyword '%s' in '%s' section\n", file, linenum, args[0], cursection);
+               err_code |= ERR_ALERT | ERR_ABORT;
+       }
 
   out:
        free(errmsg);