Running regress/usr.sbin/ocspcheck with a resolv.conf that has
'family inet6 inet4' fails because ocspcheck only tries to contact ::1.
The following diff fixes the issue by not breaking out early from the
getaddrinfo loop over the results. With this the regress test works
and I guess it may help in some real life cases as well.
OK?
--
:wq Claudio
Index: ocspcheck.c
===================================================================
RCS file: /cvs/src/usr.sbin/ocspcheck/ocspcheck.c,v
retrieving revision 1.28
diff -u -p -r1.28 ocspcheck.c
--- ocspcheck.c 16 Oct 2020 01:16:55 -0000 1.28
+++ ocspcheck.c 9 Feb 2021 09:49:54 -0000
@@ -113,7 +113,6 @@ host_dns(const char *s, struct addr vec[
dspew("DNS returns %s for %s\n", vec[vecsz].ip, s);
vecsz++;
- break;
}
freeaddrinfo(res0);