openconfig/public

Negative clock offsets are not representable in the NTP model

nkitchen opened this issue · 1 comments

NTP clock offsets can be negative, but the current model uses uint64 to represent them:

https://github.com/openconfig/public/blob/master/release/models/system/openconfig-system.yang#L783-L784

This issue overlaps with #848, which also recognizes the problem with uint offsets, but this issue does not take the position that the type should necessarily be decimal64, nor does it cover root-delay and root-dispersion.

As described in RFC 5905, the range of the offset that can be computed from the timestamps in NTP packets is ±34 years.

If the offset node had type int64 with microsecond units, its range would be ±263 / 106 seconds, which is about ±292,277 years -- so we don't need millisecond units to get sufficient range.

(Actually, even nanosecond units would work: They would give us a range of ±292 years.)