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
f74235ab
Commit
f74235ab
authored
Apr 18, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed/unsigned polish
parent
94414c2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
v00017.vtc
bin/varnishtest/tests/v00017.vtc
+2
-2
vcc_acl.c
lib/libvcc/vcc_acl.c
+3
-3
No files found.
bin/varnishtest/tests/v00017.vtc
View file @
f74235ab
varnishtest "VCL compiler coverage test: vcc_acl.c"
varnish v1 -errvcl {Too wide mask (33) for IPv4 address} {
varnish v1 -errvcl {Too wide mask (
/
33) for IPv4 address} {
backend b { .host = "127.0.0.1"; }
acl a { "10.1.2.3"/33; }
sub vcl_recv { if (client.ip ~ a) { return(pass); } }
}
varnish v1 -errvcl {Too wide mask (129) for IPv6 address} {
varnish v1 -errvcl {Too wide mask (
/
129) for IPv6 address} {
backend b { .host = "127.0.0.1"; }
acl a { "1::2"/129; }
sub vcl_recv { if (client.ip ~ a) { return(pass); } }
...
...
lib/libvcc/vcc_acl.c
View file @
f74235ab
...
...
@@ -99,7 +99,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
if
(
fam
==
PF_INET
&&
ae
->
mask
>
32
)
{
VSB_printf
(
tl
->
sb
,
"Too wide mask (
%u
) for IPv4 address
\n
"
,
ae
->
mask
);
"Too wide mask (
/%d
) for IPv4 address
\n
"
,
ae
->
mask
);
if
(
ae
->
t_mask
!=
NULL
)
vcc_ErrWhere
(
tl
,
ae
->
t_mask
);
else
...
...
@@ -108,7 +108,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
}
if
(
fam
==
PF_INET6
&&
ae
->
mask
>
128
)
{
VSB_printf
(
tl
->
sb
,
"Too wide mask (
%u
) for IPv6 address
\n
"
,
ae
->
mask
);
"Too wide mask (
/%d
) for IPv6 address
\n
"
,
ae
->
mask
);
vcc_ErrWhere
(
tl
,
ae
->
t_mask
);
return
;
}
...
...
@@ -231,7 +231,7 @@ vcc_acl_try_getaddrinfo(struct vcc *tl, struct acl_e *ae)
if
(
ae
->
t_mask
!=
NULL
&&
i4
>
0
&&
i6
>
0
)
{
VSB_printf
(
tl
->
sb
,
"Mask (
%u
) specified, but string resolves to"
"Mask (
/%d
) specified, but string resolves to"
" both IPv4 and IPv6 addresses.
\n
"
,
ae
->
mask
);
vcc_ErrWhere
(
tl
,
ae
->
t_mask
);
return
;
...
...
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