On Wed, Nov 06, 2019 at 11:30:32AM +0100, Florian Obser wrote:
> > @@ -94,7 +95,7 @@ host_dns1(const char *s, struct ntp_addr
> > struct ntp_addr *h, *hh = NULL;
> >
> > memset(&hints, 0, sizeof(hints));
> > - hints.ai_family = AF_UNSPEC;
> > + hints.ai_family = (test_v4_gw() == 0) ? AF_UNSPEC : AF_INET6;
> > hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
> > hints.ai_flags = AI_ADDRCONFIG;
>
> you just implemented a variation of AI_ADDRCONFIG
Oh you're right! Good you're looking over me Florian! So here is the
right patch then that I want OpenBSD to consider, with it I don't see
the timeouts messages (are they needed?):
Best Regards,
-peter
Index: ntp_dns.c
===================================================================
RCS file: /cvs/src/usr.sbin/ntpd/ntp_dns.c,v
retrieving revision 1.24
diff -u -p -u -r1.24 ntp_dns.c
--- ntp_dns.c 27 Jun 2019 15:18:42 -0000 1.24
+++ ntp_dns.c 6 Nov 2019 10:39:36 -0000
@@ -170,7 +170,7 @@ dns_dispatch_imsg(struct ntpd_conf *ncon
strlen(name) != len)
fatalx("invalid %s received", str);
if ((cnt = host_dns(name, nconf->status.synced,
- &hn)) == -1)
+ &hn)) <= 0)
break;
buf = imsg_create(ibuf_dns, imsg.hdr.type,
imsg.hdr.peerid, 0,