]> err.no Git - varnish/commit
Implement '==' and '!=' for IP number variables (presently only client.ip)
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 9 May 2007 08:06:00 +0000 (08:06 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 9 May 2007 08:06:00 +0000 (08:06 +0000)
commitfb03a47d1a0b2c272cc0e07a034940c468d50fac
tree9b115f3092eb3fb85a844ecfd7ca08cb726c7960
parentc56f714cd1073b020ebbb64b16ae584c4c85d823
Implement '==' and '!=' for IP number variables (presently only client.ip)

It works by building a one-entry ACL of the subsequent tokens
and matching this ACL just like '~' would have done.

This means that it is possible to use the '!', '(...)', '/width'
constructs and domain-names in these comparisons.

Examples:

if (client.ip == ( "www.freebsd.org" )) {

if (client.ip == (! "localhost" )) {

if (client.ip == (! "10.0.0.0"/8 )) {

or even

if (client.ip != "somehost" / 28) {

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1389 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/lib/libvcl/vcc_acl.c