Recode the state machine to make it a bit less confusing. Collapse the
two failure states into a single failure state and handle failure processing
in each state.
Handle DNS failures by having dntpd relookup failed DNSes occassionally.
dntpd will now relookup the server name if a server fails, allowing you
to specify domains which front pools of ntp servers. dntpd will also
check for duplicate IPs and relookup again (up to a point).
Add a sanity check. If two or more servers are specified a quorum of
servers must agree that the selected time offset is reasonable. For the
moment do a +/- 30 second check (though we can probably make this +/- 2
seconds). If a server is determined to be broken, scrap its data and
reconnect. If it is still broken, permanently disable it. This is
primarily to handle severely broken servers that are occassionally present
in ntp pools.