Commit b932d06e authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Use our DNS canary in the test suite

Closes #3237
parent b39b8b2b
......@@ -85,7 +85,7 @@ varnish v1 -errvcl {Regexp compilation error:} {
varnish v1 -errvcl {resolves to too many addresses} {
backend b { .host = "127.0.0.1"; }
sub vcl_recv {
if (remote.ip == "fastly.com") {}
if (remote.ip == "dns-canary-multi.varnish-cache.org") {}
}
}
......
......@@ -354,21 +354,21 @@ dns_works(void)
char abuf[VTCP_ADDRBUFSIZE];
char pbuf[VTCP_PORTBUFSIZE];
sa = VSS_ResolveOne(NULL, "varnish.org", NULL,
sa = VSS_ResolveOne(NULL, "dns-canary.varnish-cache.org", NULL,
AF_INET, SOCK_STREAM, 0);
if (sa == NULL)
return (0);
VTCP_name(sa, abuf, sizeof abuf, pbuf, sizeof pbuf);
free(sa);
if (strcmp(abuf, "176.58.90.154"))
if (strcmp(abuf, "192.0.2.255"))
return (0);
sa = VSS_ResolveOne(NULL, "varnish.org", NULL,
sa = VSS_ResolveOne(NULL, "dns-canary.varnish-cache.org", NULL,
AF_INET6, SOCK_STREAM, 0);
if (sa == NULL)
return (0);
return (1); /* the canary is ipv4 only */
free(sa);
return (1);
return (0);
}
/* SECTION: feature feature
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment