On Tue, Oct 30, 2012 at 10:30:45PM +0000, Tomalak Geret'kal wrote: > I feel like we've been over this sufficiently to solve the problem. > Chrony could near-trivially poll the resolver when required with > such a mechanism being rate limited if you're worried about syscall > performance, and the history can remain IP-keyed.
How exactly would chrony do that? As Unruh pointed out, getaddrinfo() doesn't probvide the TTL and calling it before sending every NTP packet can easily result in making a DNS query over network for every call unless a local caching is running (nscd, dnsmasq). Also, with pool.ntp.org the addresses are rotated in the results, I think that would be difficult to handle correctly. There is another problem with getaddrinfo(), it blocks. That can be solved by using threads or forking the resolving code as ntpd does. The best fix for all these problem would probably be using an async DNS library which returns the TTL. But I didn't find a good one the last time I checked. I think it should be small, well maintained, GPLv2 compatible and available also on other systems than Linux. Any tips? -- Miroslav Lichvar -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.