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
c862d49e
Commit
c862d49e
authored
Jan 11, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add two new feature-checks: `feature ipv4` and `feature ipv6`
parent
e75a5d70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
b00000.vtc
bin/varnishtest/tests/b00000.vtc
+4
-1
vtc_misc.c
bin/varnishtest/vtc_misc.c
+24
-0
No files found.
bin/varnishtest/tests/b00000.vtc
View file @
c862d49e
varnishtest "Does anything get through at all ?"
server s1 {
feature ipv4
feature ipv6
server s1 -listen 127.0.0.1:0 {
rxreq
txresp -body "012345\n"
} -start
...
...
bin/varnishtest/vtc_misc.c
View file @
c862d49e
...
...
@@ -365,6 +365,28 @@ dns_works(void)
return
(
0
);
}
/**********************************************************************
* Test if IPv4/IPv6 works
*/
static
int
ipvx_works
(
const
char
*
target
)
{
struct
suckaddr
*
sa
;
int
fd
;
sa
=
VSS_ResolveOne
(
NULL
,
target
,
"0"
,
0
,
SOCK_STREAM
,
0
);
if
(
sa
==
NULL
)
return
(
0
);
fd
=
VTCP_bind
(
sa
,
NULL
);
free
(
sa
);
if
(
fd
>=
0
)
{
VTCP_close
(
&
fd
);
return
(
1
);
}
return
(
0
);
}
/* SECTION: feature feature
*
* Test that the required feature(s) for a test are available, and skip
...
...
@@ -439,6 +461,8 @@ cmd_feature(CMD_ARGS)
#endif
}
FEATURE
(
"ipv4"
,
ipvx_works
(
"127.0.0.1"
));
FEATURE
(
"ipv6"
,
ipvx_works
(
"[::1]"
));
FEATURE
(
"pcre_jit"
,
VRE_has_jit
);
FEATURE
(
"64bit"
,
sizeof
(
void
*
)
==
8
);
FEATURE
(
"dns"
,
dns_works
());
...
...
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