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
d0a89676
Unverified
Commit
d0a89676
authored
Apr 09, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VDP/VFP sanity
* there is no NULL filter * the filter name cannot be NULL or empty
parent
a80d0362
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
cache_vrt_filter.c
bin/varnishd/cache/cache_vrt_filter.c
+16
-0
No files found.
bin/varnishd/cache/cache_vrt_filter.c
View file @
d0a89676
...
...
@@ -70,6 +70,10 @@ VRT_AddVFP(VRT_CTX, const struct vfp *filter)
struct
vfilter_head
*
hd
=
&
vfp_filters
;
CHECK_OBJ_ORNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
filter
);
AN
(
filter
->
name
);
AN
(
*
filter
->
name
);
VTAILQ_FOREACH
(
vp
,
hd
,
list
)
{
xxxassert
(
vp
->
vfp
!=
filter
);
xxxassert
(
strcasecmp
(
vp
->
name
,
filter
->
name
));
...
...
@@ -97,6 +101,10 @@ VRT_AddVDP(VRT_CTX, const struct vdp *filter)
struct
vfilter_head
*
hd
=
&
vdp_filters
;
CHECK_OBJ_ORNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
filter
);
AN
(
filter
->
name
);
AN
(
*
filter
->
name
);
VTAILQ_FOREACH
(
vp
,
hd
,
list
)
{
xxxassert
(
vp
->
vdp
!=
filter
);
xxxassert
(
strcasecmp
(
vp
->
name
,
filter
->
name
));
...
...
@@ -124,6 +132,10 @@ VRT_RemoveVFP(VRT_CTX, const struct vfp *filter)
struct
vfilter_head
*
hd
=
&
ctx
->
vcl
->
vfps
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
filter
);
AN
(
filter
->
name
);
AN
(
*
filter
->
name
);
ASSERT_CLI
();
VTAILQ_FOREACH
(
vp
,
hd
,
list
)
{
if
(
vp
->
vfp
==
filter
)
...
...
@@ -141,6 +153,10 @@ VRT_RemoveVDP(VRT_CTX, const struct vdp *filter)
struct
vfilter_head
*
hd
=
&
ctx
->
vcl
->
vdps
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
filter
);
AN
(
filter
->
name
);
AN
(
*
filter
->
name
);
ASSERT_CLI
();
VTAILQ_FOREACH
(
vp
,
hd
,
list
)
{
if
(
vp
->
vdp
==
filter
)
...
...
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