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
0ce0d37c
Unverified
Commit
0ce0d37c
authored
Apr 04, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up the mgt->vcc interface for vcc_acl_pedantic
Spotted by flexelint Ref:
6c8f25e7
parent
03463abf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
4 deletions
+14
-4
mgt_vcc.c
bin/varnishd/mgt/mgt_vcc.c
+2
-0
libvcc.h
include/libvcc.h
+1
-0
vcc_acl.c
lib/libvcc/vcc_acl.c
+2
-4
vcc_compile.c
lib/libvcc/vcc_compile.c
+8
-0
vcc_compile.h
lib/libvcc/vcc_compile.h
+1
-0
No files found.
bin/varnishd/mgt/mgt_vcc.c
View file @
0ce0d37c
...
@@ -68,6 +68,7 @@ const char *mgt_vmod_path;
...
@@ -68,6 +68,7 @@ const char *mgt_vmod_path;
unsigned
mgt_vcc_err_unref
;
unsigned
mgt_vcc_err_unref
;
unsigned
mgt_vcc_allow_inline_c
;
unsigned
mgt_vcc_allow_inline_c
;
unsigned
mgt_vcc_unsafe_path
;
unsigned
mgt_vcc_unsafe_path
;
unsigned
mgt_vcc_acl_pedantic
;
#define VGC_SRC "vgc.c"
#define VGC_SRC "vgc.c"
...
@@ -109,6 +110,7 @@ run_vcc(void *priv)
...
@@ -109,6 +110,7 @@ run_vcc(void *priv)
VCC_Err_Unref
(
vcc
,
mgt_vcc_err_unref
);
VCC_Err_Unref
(
vcc
,
mgt_vcc_err_unref
);
VCC_Allow_InlineC
(
vcc
,
mgt_vcc_allow_inline_c
);
VCC_Allow_InlineC
(
vcc
,
mgt_vcc_allow_inline_c
);
VCC_Unsafe_Path
(
vcc
,
mgt_vcc_unsafe_path
);
VCC_Unsafe_Path
(
vcc
,
mgt_vcc_unsafe_path
);
VCC_Acl_Pedantic
(
vcc
,
mgt_vcc_acl_pedantic
);
STV_Foreach
(
stv
)
STV_Foreach
(
stv
)
VCC_Predef
(
vcc
,
"VCL_STEVEDORE"
,
stv
->
ident
);
VCC_Predef
(
vcc
,
"VCL_STEVEDORE"
,
stv
->
ident
);
VTAILQ_FOREACH
(
vpg
,
&
vclhead
,
list
)
VTAILQ_FOREACH
(
vpg
,
&
vclhead
,
list
)
...
...
include/libvcc.h
View file @
0ce0d37c
...
@@ -37,6 +37,7 @@ void VCC_Allow_InlineC(struct vcc *, unsigned);
...
@@ -37,6 +37,7 @@ void VCC_Allow_InlineC(struct vcc *, unsigned);
void
VCC_Builtin_VCL
(
struct
vcc
*
,
const
char
*
);
void
VCC_Builtin_VCL
(
struct
vcc
*
,
const
char
*
);
void
VCC_Err_Unref
(
struct
vcc
*
,
unsigned
);
void
VCC_Err_Unref
(
struct
vcc
*
,
unsigned
);
void
VCC_Unsafe_Path
(
struct
vcc
*
,
unsigned
);
void
VCC_Unsafe_Path
(
struct
vcc
*
,
unsigned
);
void
VCC_Acl_Pedantic
(
struct
vcc
*
,
unsigned
);
void
VCC_VCL_path
(
struct
vcc
*
,
const
char
*
);
void
VCC_VCL_path
(
struct
vcc
*
,
const
char
*
);
void
VCC_VMOD_path
(
struct
vcc
*
,
const
char
*
);
void
VCC_VMOD_path
(
struct
vcc
*
,
const
char
*
);
void
VCC_Predef
(
struct
vcc
*
,
const
char
*
type
,
const
char
*
name
);
void
VCC_Predef
(
struct
vcc
*
,
const
char
*
type
,
const
char
*
name
);
...
...
lib/libvcc/vcc_acl.c
View file @
0ce0d37c
...
@@ -43,8 +43,6 @@
...
@@ -43,8 +43,6 @@
#include <vtcp.h>
#include <vtcp.h>
#include <vsa.h>
#include <vsa.h>
unsigned
mgt_vcc_acl_pedantic
;
#define ACL_MAXADDR (sizeof(struct in6_addr) + 1)
#define ACL_MAXADDR (sizeof(struct in6_addr) + 1)
struct
acl_e
{
struct
acl_e
{
...
@@ -140,12 +138,12 @@ vcc_acl_chk(struct vcc *tl, const struct acl_e *ae, const int l,
...
@@ -140,12 +138,12 @@ vcc_acl_chk(struct vcc *tl, const struct acl_e *ae, const int l,
AN
(
sa
);
AN
(
sa
);
VTCP_name
(
sa
,
h
,
sizeof
h
,
NULL
,
0
);
VTCP_name
(
sa
,
h
,
sizeof
h
,
NULL
,
0
);
bprintf
(
t
,
"%s/%d"
,
h
,
ae
->
mask
);
bprintf
(
t
,
"%s/%d"
,
h
,
ae
->
mask
);
if
(
mgt_vcc_acl_pedantic
)
if
(
tl
->
acl_pedantic
!=
0
)
VSB_printf
(
tl
->
sb
,
"Address/Netmask mismatch, need be %s
\n
"
,
t
);
VSB_printf
(
tl
->
sb
,
"Address/Netmask mismatch, need be %s
\n
"
,
t
);
else
else
VSB_printf
(
tl
->
sb
,
"Address/Netmask mismatch, changed to %s
\n
"
,
t
);
VSB_printf
(
tl
->
sb
,
"Address/Netmask mismatch, changed to %s
\n
"
,
t
);
vcc_ErrWhere
(
tl
,
ae
->
t_addr
);
vcc_ErrWhere
(
tl
,
ae
->
t_addr
);
if
(
mgt_vcc_
acl_pedantic
==
0
)
if
(
tl
->
acl_pedantic
==
0
)
vcc_Warn
(
tl
);
vcc_Warn
(
tl
);
return
(
strdup
(
t
));
return
(
strdup
(
t
));
}
}
...
...
lib/libvcc/vcc_compile.c
View file @
0ce0d37c
...
@@ -913,6 +913,14 @@ VCC_Unsafe_Path(struct vcc *vcc, unsigned u)
...
@@ -913,6 +913,14 @@ VCC_Unsafe_Path(struct vcc *vcc, unsigned u)
vcc
->
unsafe_path
=
u
;
vcc
->
unsafe_path
=
u
;
}
}
void
VCC_Acl_Pedantic
(
struct
vcc
*
vcc
,
unsigned
u
)
{
CHECK_OBJ_NOTNULL
(
vcc
,
VCC_MAGIC
);
vcc
->
acl_pedantic
=
u
;
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
* Configure settings
* Configure settings
*/
*/
...
...
lib/libvcc/vcc_compile.h
View file @
0ce0d37c
...
@@ -222,6 +222,7 @@ struct vcc {
...
@@ -222,6 +222,7 @@ struct vcc {
unsigned
err_unref
;
unsigned
err_unref
;
unsigned
allow_inline_c
;
unsigned
allow_inline_c
;
unsigned
unsafe_path
;
unsigned
unsafe_path
;
unsigned
acl_pedantic
;
struct
symtab
*
syms
;
struct
symtab
*
syms
;
...
...
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