summaryrefslogtreecommitdiff
path: root/usr.sbin/acme-client
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-11-06 21:05:46 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-11-06 21:05:46 +0000
commit49f2fe39358a549cf8b79da586afeee7e1f1b32f (patch)
treee965b78a6f5af3f996278d6f6f7ff8c19e707ff6 /usr.sbin/acme-client
parent6c4925089b7d54be2753071c874163ab5aa82753 (diff)
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@
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r--usr.sbin/acme-client/dnsproc.c4
1 files changed, 2 insertions, 2 deletions
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 <kristaps@bsd.lv>
*
@@ -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);