[master] d32906f86 Check IPv6 in varnishtest dns feature
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Oct 4 08:22:06 UTC 2019
commit d32906f86aeee1fe462ced9897a31c6d40110ea8
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Oct 4 10:17:49 2019 +0200
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.
diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index d2c897f46..d49388352 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/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);
}
More information about the varnish-commit
mailing list