[ntp:hackers] nonblocking DNS code nearly complete

Dave Hart davehart at gmail.com
Mon Jan 11 04:31:59 UTC 2010


On Mon, Jan 11, 2010 at 4:18 UTC, David Mills <mills at udel.edu> wrote:
> The reason for the funky file is to save the configuration parameters until
> the DNS reply, then mobilize the association with this information. You code
> fragment implies the association is mobilized before the DNS query, so the
> only thing the callback routine has to do is plug in the DNS address. Can
> you confirm this?

That's not how it's currently implemented with the new intres.
Instead, the peer configuration tree node is kept around (by being
passed as the void * context parameter to getaddrinfo_sometime()) and
once the name has been resolved to address(es), peer_config() is used
to mobilize the association by address, or in the case of a pool
command, up to sys_maxclock associations.  This is very similar to the
way the old intres works, though that code path was only triggered if
the initial blocking lookup failed.

Cheers,
Dave Hart


More information about the hackers mailing list