From 49f2fe39358a549cf8b79da586afeee7e1f1b32f Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Wed, 6 Nov 2019 21:05:46 +0000 Subject: Give acme-client a chance to work on IPv6 only hosts by using the AI_ADDRCONFIG flag for getaddrinfo to only return addresses for a configured address family. Implementing a loop over all IPs is left as an exercise to the reader. Reported some time ago by kasimov.an AT gmail on bugs@, thanks! oh boy deraadt@ OK benno@ --- usr.sbin/acme-client/dnsproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/acme-client/dnsproc.c b/usr.sbin/acme-client/dnsproc.c index 9593828a121..539fb89121e 100644 --- a/usr.sbin/acme-client/dnsproc.c +++ b/usr.sbin/acme-client/dnsproc.c @@ -1,4 +1,4 @@ -/* $Id: dnsproc.c,v 1.9 2017/01/24 13:32:55 jsing Exp $ */ +/* $Id: dnsproc.c,v 1.10 2019/11/06 21:05:45 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons * @@ -61,7 +61,7 @@ host_dns(const char *s, struct addr *vec) memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ - /* ntpd MUST NOT use AI_ADDRCONFIG here */ + hints.ai_flags = AI_ADDRCONFIG; error = getaddrinfo(s, NULL, &hints, &res0); -- cgit v1.2.3