Mouse <[email protected]> writes:
> "Dag-Erling Smørgrav" <[email protected]> writes:
> > Standard procedure is to use getaddrinfo(), iterate over the results,
> > try to bind or connect to each address (depending on whether you're a
> > server or a client) and ignore any failures as long as at least one
> > address works.
> Yes.  [...]  However, in this case, we're talking about NTP, which
> runs over connectionless protocols anyway.  I'm not sure what I think
> the best action here is.  Initiate associations with all addresses,
> maybe?

If you're talking about the server, note the use of "bind or connect"
above.

If you're talking about the client, you can still call connect() (even
for SOCK_DGRAM sockets) and hope the stack returns an error if it does
not have a route to the destination.  If not, well, exponential backoff
will ensure that the cost of keeping an unreachable server in the list
is close to zero.

Perhaps servers that have been in the INIT state longer than a certain
period should move to a new DEAD state.  For the laptop-on-a-plane or
backhoe scenario, if all your servers are DEAD, they should all revert
to INIT.

DES
-- 
Dag-Erling Smørgrav - [email protected]
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to