BUG/MINOR: checks: Forbid tcp-check lines in default section as documented
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index fbefdd5..4117ea9 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -3019,6 +3019,13 @@
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
err_code |= ERR_WARN;
+ if (curproxy == &defproxy) {
+ ha_alert("parsing [%s:%d]: '%s' not allowed in 'defaults' section.\n",
+ file, linenum, args[0]);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ goto out;
+ }
+
if (strcmp(args[1], "comment") == 0) {
int cur_arg;
struct tcpcheck_rule *tcpcheck;