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
ab9cec7c
Commit
ab9cec7c
authored
Nov 18, 2011
by
Kristian Lyngstol
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://git.varnish-cache.org/git/varnish-cache
parents
4895d9f9
bdbb1d59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
r01060.vtc
bin/varnishtest/tests/r01060.vtc
+48
-0
vcc_dir_dns.c
lib/libvcl/vcc_dir_dns.c
+1
-1
No files found.
bin/varnishtest/tests/r01060.vtc
0 → 100644
View file @
ab9cec7c
varnishtest "DNS director tramples on other backends"
server s1 {
rxreq
txresp
} -start
server s2 {
rxreq
txresp
} -start
varnish v1 -vcl {
backend b1 {
.host = "${s1_addr}";
.port = "${s1_port}";
}
director d1 dns {
.list = {
.port = "80";
"${bad_ip}"/32;
}
.ttl = 1m;
}
backend b2 {
.host = "${s2_addr}";
.port = "${s2_port}";
}
sub vcl_recv {
set req.backend = d1;
if (req.url == "/1") {
set req.backend = b1;
} else {
set req.backend = b2;
}
}
} -start
client c1 {
txreq -url "/1"
rxresp
txreq -url "/2"
rxresp
} -run
lib/libvcl/vcc_dir_dns.c
View file @
ab9cec7c
...
@@ -79,7 +79,7 @@ print_backend(struct vcc *tl,
...
@@ -79,7 +79,7 @@ print_backend(struct vcc *tl,
AN
(
vsb
);
AN
(
vsb
);
tl
->
fb
=
vsb
;
tl
->
fb
=
vsb
;
Fc
(
tl
,
0
,
"
\t
{ .host = VGC_backend_%s },
\n
"
,
vgcname
);
Fc
(
tl
,
0
,
"
\t
{ .host = VGC_backend_%s },
\n
"
,
vgcname
);
Fh
(
tl
,
1
,
"
\n
#define VGC_backend_%s %d
\n
"
,
vgcname
,
serial
);
Fh
(
tl
,
1
,
"
\n
#define VGC_backend_%s %d
\n
"
,
vgcname
,
tl
->
ndirector
);
Fb
(
tl
,
0
,
"
\n
static const struct vrt_backend vgc_dir_priv_%s = {
\n
"
,
Fb
(
tl
,
0
,
"
\n
static const struct vrt_backend vgc_dir_priv_%s = {
\n
"
,
vgcname
);
vgcname
);
...
...
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