summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2014-06-13 18:30:23 +0200
committerWilly Tarreau <w@1wt.eu>2014-06-13 18:30:23 +0200
commit215663dbf3f24f729b87eea090b3f84dd679d509 (patch)
treee2560b631ea1512627c30f744bb2ea77390f62bb
parent33a14e515bdbb02d8193bd870f3b659243a851f9 (diff)
downloadhaproxy-215663dbf3f24f729b87eea090b3f84dd679d509.tar.gz
MINOR: config: warn when tcp-check rules are used without option tcp-check
Since this case means that the rules will be ignored, better emit a warning.
-rw-r--r--src/cfgparse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 00b75828d..017bcae02 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -6504,6 +6504,13 @@ out_uri_auth_compat:
memcpy(curproxy->check_req, sslv3_client_hello_pkt, curproxy->check_len);
}
+ if (!LIST_ISEMPTY(&curproxy->tcpcheck_rules) &&
+ (curproxy->options2 & PR_O2_CHK_ANY) != PR_O2_TCPCHK_CHK) {
+ Warning("config : %s '%s' uses tcp-check rules without 'option tcp-check', so the rules are ignored.\n",
+ proxy_type_str(curproxy), curproxy->id);
+ err_code |= ERR_WARN;
+ }
+
/* ensure that cookie capture length is not too large */
if (curproxy->capture_len >= global.tune.cookie_len) {
Warning("config : truncating capture length to %d bytes for %s '%s'.\n",