diff -Nur haproxy-1.3.18/src/proto_tcp.c haproxy-1.3.18-tcp-request-condition-fix/src/proto_tcp.c --- haproxy-1.3.18/src/proto_tcp.c 2009-05-10 20:27:47.000000000 +0200 +++ haproxy-1.3.18-tcp-request-condition-fix/src/proto_tcp.c 2009-05-12 01:25:48.000000000 +0200 @@ -509,6 +509,13 @@ pol = ACL_COND_IF; else if (!strcmp(args[3], "unless")) pol = ACL_COND_UNLESS; + else { + if (args[3][0] != '\0') { + snprintf(err, errlen, "'%s %s %s' expects 'if', 'unless' or nothing, but found '%s'", + args[0], args[1], args[2], args[3]); + return -1; + } + } /* Note: we consider "if TRUE" when there is no condition */ if (pol != ACL_COND_NONE &&