sometime time server does not provide valid time , this need to be managed inside NTPClient::forceUpdate() #133
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
RFC4330 says:
The server reply should be discarded if any of the LI, Stratum, or Transmit Timestamp fields is 0 or the Mode field is not 4 (unicast) or 5 (broadcast).
I have detected that sometime the time server reply with Transmit Timestamp fields equal to 0, this error case is not managed inside forceUpdate and lead to totaly wrong time. In the error case I have seen LI,Stratum,Mode field where correct.
I suggest to check this inside forceUpdate
Proposed changes (obviously many other method, could also just return false if Transmit Timestamp fields equal to 0.
The text was updated successfully, but these errors were encountered: