From f30c50a23946819c766bded70555611e4ee7c46f Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 9 Feb 2021 16:55:51 +0000 Subject: [PATCH] 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@ --- usr.sbin/ocspcheck/ocspcheck.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.20.1