RFC 5905, "Network Time Protocol Version 4: Protocol and Algorithms Specification", June 2010
Source of RFC: ntp (int)
Updated by: RFC7822, RFC8573, RFC9109, RFC9748, RFC9769
Errata-ID: 6550
- Status:
- Verified
- Type:
- Technical
- Reported By:
- Perry Lorier
- Date Reported:
- 2021-04-17
- Verified by:
- 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.