Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
a7945656
Commit
a7945656
authored
Mar 24, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Thest ACL's more comprehensively.
parent
596c0a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletion
+58
-1
r01312.vtc
bin/varnishtest/tests/r01312.vtc
+58
-1
No files found.
bin/varnishtest/tests/r01312.vtc
View file @
a7945656
varnishtest "acl
miscompile
"
varnishtest "acl
functional (& historic miscompile)
"
server s1 {
rxreq
...
...
@@ -7,6 +7,7 @@ server s1 {
varnish v1 -vcl+backend {
import std;
import debug;
acl foo {
"127.0.0.2";
...
...
@@ -16,15 +17,71 @@ varnish v1 -vcl+backend {
"127.0.1.2";
"127.0.1"/19;
}
acl block {
# Tests all boundary conditions
"192.168.8.0" / 21;
! "192.168.16" / 21;
"192.168.8.0" / 23;
! "192.168.14.0" / 23;
"192.168.16.0" / 23;
! "192.168.22.0" / 23;
! "192.168.8.0" / 24;
! "192.168.11.0" / 24;
"192.168.15.0" / 24;
! "192.168.16.0" / 24;
"192.168.19.0" / 24;
"192.168.23.0" / 24;
# Same pattern, but split across bytes
"::0080" / 121;
! "::0100" / 121;
"::0080" / 123;
! "::00e0" / 123;
"::0100" / 123;
! "::0160" / 123;
! "::0080" / 124;
! "::00b0" / 124;
"::00f0" / 124;
! "::0100" / 124;
"::0130" / 124;
"::0170" / 124;
}
sub vcl_deliver {
set resp.http.acl4 = debug.sweep_acl(
block,
std.ip("192.168.0.0"),
std.ip("192.168.32.255"),
256
);
set resp.http.acl6 = debug.sweep_acl(
block,
std.ip("::"),
std.ip("::0200"),
16
);
set resp.http.ACLfoo = std.ip("127.0.0.1", client.ip) ~ foo;
set resp.http.ACLbar = std.ip("127.0.0.1", client.ip) ~ bar;
}
} -start
varnish v1 -cliok "param.set vsl_mask +Debug,-VCL_acl"
varnish v1 -cliok "param.set debug +syncvsl"
logexpect l1 -v v1 -g raw {
expect * 1001 Debug {Sweep: 192.168.0.0 ---------XX-XX-X-X-X---X---------}
expect * 1001 Debug {Sweep: :: ---------XX-XX-X-X-X---X---------}
} -start
client c1 {
txreq
rxresp
expect resp.http.aclfoo == true
expect resp.http.aclbar == true
expect resp.http.acl4 == ":4thASR0O18ZxnoKtc4zd8KuO25rPvwvMQyAvRfilz6o=:"
expect resp.http.acl6 == ":NSi+7wpvQe7XJj8DPbESjpYPGnIzvjOsA5QCyCnW3kc=:"
} -run
logexpect l1 -wait
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment