RFC Errata
RFC 5905, "Network Time Protocol Version 4: Protocol and Algorithms Specification", June 2010
Note: This RFC has been updated by RFC 7822, RFC 8573, RFC 9109
Source of RFC: ntp (int)See Also: RFC 5905 w/ inline errata
Errata ID: 6550
Status: Verified
Type: Technical
Publication Format(s) : TEXT
Reported By: Perry Lorier
Date Reported: 2021-04-17
Verifier Name: Erik Kline
Date Verified: 2022-08-29
Section A.5.2 says:
for (i = 0; i < NSTAGE; i++) { p->disp += f[i].disp / (2 ^ (i + 1)); p->jitter += SQUARE(f[i].offset - f[0].offset); }
It should say:
for (i = 0; i < NSTAGE; i++) { p->disp += f[i].disp / (1 << (i + 1)); p->jitter += SQUARE(f[i].offset - f[0].offset); }
Notes:
^ is the xor operator in C, not the exponent operator. 2 xor (i+1) will be zero when i == 1, causing a division by zero error.