Skip to content
Permalink
Browse files

Check IPv6 in varnishtest dns feature

On a network where you can't trust the DNS resolver because it filters
AAAA records out v00016.vtc fails.
  • Loading branch information...
Dridi committed Oct 4, 2019
1 parent fb70da3 commit d32906f86aeee1fe462ced9897a31c6d40110ea8
Showing with 8 additions and 1 deletion.
  1. +8 −1 bin/varnishtest/vtc_misc.c
@@ -352,13 +352,20 @@ dns_works(void)
char abuf[VTCP_ADDRBUFSIZE];
char pbuf[VTCP_PORTBUFSIZE];

sa = VSS_ResolveOne(NULL, "dns-canary.freebsd.dk", NULL, AF_UNSPEC, SOCK_STREAM, 0);
sa = VSS_ResolveOne(NULL, "dns-canary.freebsd.dk", NULL,
AF_UNSPEC, SOCK_STREAM, 0);
if (sa == NULL)
return (0);
VTCP_name(sa, abuf, sizeof abuf, pbuf, sizeof pbuf);
free(sa);
if (strcmp(abuf, "192.0.2.255"))
return (0);

sa = VSS_ResolveOne(NULL, "varnish.org", NULL,
AF_INET6, SOCK_STREAM, 0);
if (sa == NULL)
return (0);
free(sa);
return (1);
}

0 comments on commit d32906f

Please sign in to comment.
You can’t perform that action at this time.