[3.0] e5da6ec Use ndirector, not serial in DNS director.
Tollef Fog Heen
tfheen at varnish-cache.org
Mon Apr 22 13:27:01 CEST 2013
commit e5da6ec90ca3e9917ec65bf077cf0042bd9b9e94
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Mon Apr 22 13:25:43 2013 +0200
Use ndirector, not serial in DNS director.
The test case for this doesn't trigger, but the failing VCL (when
given in a file with -f) looks like:
director squid round-robin {
{ .backend = { .host = "127.0.0.1"; .port = "3131"; } }
}
director dnsdir dns {
.list = {
"201.7.184.0"/32;
}
}
sub vcl_recv {
set req.backend = dnsdir;
}
Fixes #1295
diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c
index 45c80c1..72a9efb 100644
--- a/lib/libvcl/vcc_dir_dns.c
+++ b/lib/libvcl/vcc_dir_dns.c
@@ -87,7 +87,7 @@ print_backend(struct vcc *tl,
AN(vsb);
tl->fb = vsb;
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, "\nstatic const struct vrt_backend vgc_dir_priv_%s = {\n",
vgcname);
More information about the varnish-commit
mailing list