]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: acl: add a warning when an ACL keyword is used without any value
authorWilly Tarreau <w@1wt.eu>
Mon, 4 Nov 2013 17:09:12 +0000 (18:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Nov 2013 17:12:20 +0000 (18:12 +0100)
commit3c3dfd5c618cd18382b33091f10465792758f162
treea66f40cccf4908f61b1972b889d16f79e63ee9f8
parent79c412b67380c0e316863b060d31980b5fa3deb6
MINOR: acl: add a warning when an ACL keyword is used without any value

It's quite common to write directives like the following :

  tcp-request reject if WAIT_END { sc0_inc_gpc0 }

This one will never reject, because sc0_inc_gpc0 is provided no value
to compare against. The proper form should have been something like this :

  tcp-request reject if WAIT_END { sc0_inc_gpc0 gt 0 }

or :

  tcp-request reject if WAIT_END { sc0_inc_gpc0 -m found }

Now we detect the absence of any argument on the command line and emit
a warning suggesting alternatives or the use of "--" to really avoid
matching anything (might be used when debugging).
src/acl.c