From: claudio Date: Tue, 9 Feb 2021 16:55:51 +0000 (+0000) Subject: Walk over all results from getaddrinfo() instead of giving up after the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f30c50a23946819c766bded70555611e4ee7c46f;p=openbsd Walk over all results from getaddrinfo() instead of giving up after the first entry. This way ocspcheck will try all returned IPs to contact the OCSP server. Found by the regress test and a resolv.conf file with 'family inet6 inet4'. OK kn@ deraadt@ --- diff --git a/usr.sbin/ocspcheck/ocspcheck.c b/usr.sbin/ocspcheck/ocspcheck.c index dec548e0b2e..50f114f07cf 100644 --- a/usr.sbin/ocspcheck/ocspcheck.c +++ b/usr.sbin/ocspcheck/ocspcheck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocspcheck.c,v 1.28 2020/10/16 01:16:55 beck Exp $ */ +/* $OpenBSD: ocspcheck.c,v 1.29 2021/02/09 16:55:51 claudio Exp $ */ /* * Copyright (c) 2017,2020 Bob Beck @@ -113,7 +113,6 @@ host_dns(const char *s, struct addr vec[MAX_SERVERS_DNS]) dspew("DNS returns %s for %s\n", vec[vecsz].ip, s); vecsz++; - break; } freeaddrinfo(res0);